This documentation is archived and is not being maintained.

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

Checks whether the specified identity descriptors have the specified permissions for the specified token.

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

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

Parameters

token
Type: System::String

The security token on which to perform the check.

descriptors
Type: System.Collections.Generic::IEnumerable<IdentityDescriptor>

The identity descriptors 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 respective identity descriptors have the requested permissions for the specified token; otherwise, false.
The results are in the same index order as the specified identity descriptors.

Show: