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)
Syntax
'Déclaration
Public MustOverride Function HasPermission ( _
token As String, _
descriptors As IEnumerable(Of IdentityDescriptor), _
requestedPermissions As Integer, _
alwaysAllowAdministrators As Boolean _
) As Collection(Of Boolean)
public abstract Collection<bool> HasPermission(
string token,
IEnumerable<IdentityDescriptor> descriptors,
int requestedPermissions,
bool alwaysAllowAdministrators
)
public:
virtual Collection<bool>^ HasPermission(
String^ token,
IEnumerable<IdentityDescriptor^>^ descriptors,
int requestedPermissions,
bool alwaysAllowAdministrators
) abstract
abstract HasPermission :
token:string *
descriptors:IEnumerable<IdentityDescriptor> *
requestedPermissions:int *
alwaysAllowAdministrators:bool -> Collection<bool>
public abstract function HasPermission(
token : String,
descriptors : IEnumerable<IdentityDescriptor>,
requestedPermissions : int,
alwaysAllowAdministrators : boolean
) : Collection<boolean>
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.