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

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

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

Syntax

'Declaration
Public MustOverride Function HasPermission ( _
    token As String, _
    descriptor As IdentityDescriptor, _
    requestedPermissions As IEnumerable(Of Integer), _
    alwaysAllowAdministrators As Boolean _
) As Collection(Of Boolean)
public abstract Collection<bool> HasPermission(
    string token,
    IdentityDescriptor descriptor,
    IEnumerable<int> requestedPermissions,
    bool alwaysAllowAdministrators
)
public:
virtual Collection<bool>^ HasPermission(
    String^ token, 
    IdentityDescriptor^ descriptor, 
    IEnumerable<int>^ requestedPermissions, 
    bool alwaysAllowAdministrators
) abstract
abstract HasPermission : 
        token:string * 
        descriptor:IdentityDescriptor * 
        requestedPermissions:IEnumerable<int> * 
        alwaysAllowAdministrators:bool -> Collection<bool> 
public abstract function HasPermission(
    token : String, 
    descriptor : IdentityDescriptor, 
    requestedPermissions : IEnumerable<int>, 
    alwaysAllowAdministrators : boolean
) : Collection<boolean>

Parameters

  • token
    Type: System.String

    The security token on which to perform the check.

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

.NET Framework Security

See Also

Reference

SecurityNamespace Class

HasPermission Overload

Microsoft.TeamFoundation.Framework.Client Namespace