SecurityNamespace.HasPermission Method (String, IdentityDescriptor, 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 Integer, _
alwaysAllowAdministrators As Boolean _
) As Boolean
public abstract bool HasPermission(
string token,
IdentityDescriptor descriptor,
int requestedPermissions,
bool alwaysAllowAdministrators
)
public:
virtual bool HasPermission(
String^ token,
IdentityDescriptor^ descriptor,
int requestedPermissions,
bool alwaysAllowAdministrators
) abstract
abstract HasPermission :
token:string *
descriptor:IdentityDescriptor *
requestedPermissions:int *
alwaysAllowAdministrators:bool -> bool
public abstract function HasPermission(
token : String,
descriptor : IdentityDescriptor,
requestedPermissions : int,
alwaysAllowAdministrators : boolean
) : boolean
Parameters
token
Type: System.StringThe security token on which to perform the check.
descriptor
Type: Microsoft.TeamFoundation.Framework.Client.IdentityDescriptorThe identity descriptor for which to perform the security check.
requestedPermissions
Type: System.Int32The permissions that are being requested.
alwaysAllowAdministrators
Type: System.BooleanTrue if administrators should always be granted these permissions.
Return Value
Type: System.Boolean
True if the supplied descriptor has the requested permissions for the specified token; otherwise, false.
.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.