This documentation is archived and is not being maintained.

SecurityNamespace::HasPermission Method (IEnumerable<String>, IdentityDescriptor, Int32, Boolean)

Checks whether the specified identity descriptor has the specified permissions for the specified tokens.

Namespace:  Microsoft.TeamFoundation.Framework.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

public:
virtual Collection<bool>^ HasPermission(
	IEnumerable<String^>^ tokens, 
	IdentityDescriptor^ descriptor, 
	int requestedPermissions, 
	bool alwaysAllowAdministrators
) abstract

Parameters

tokens
Type: System.Collections.Generic::IEnumerable<String>

The security tokens on which to perform the check.

descriptor
Type: Microsoft.TeamFoundation.Framework.Client::IdentityDescriptor

The identity descriptor for which to perform the security check.

requestedPermissions
Type: System::Int32

The permissions that are being requested.

alwaysAllowAdministrators
Type: System::Boolean

True if administrators should always be granted these permissions.

Return Value

Type: System.Collections.ObjectModel::Collection<Boolean>
A collection of results for the respective checks. True if the specified identity descriptor has the requested permissions for the respective tokens; otherwise, false.
The results are in the same index order as the specified tokens.

Show: