次の方法で共有


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)

Syntax

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

Parameters

  • 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.

.NET Framework Security

See Also

Reference

SecurityNamespace Class

HasPermission Overload

Microsoft.TeamFoundation.Framework.Client Namespace