IsAuthorized(String,IdentityType,IAuthorizationObject,Int64) Method
See Also 
SourceCode.Authorization.Client Namespace > AuthorizationClient Class > IsAuthorized Method : IsAuthorized(String,IdentityType,IAuthorizationObject,Int64) Method



identityName
The name of the identity.
identityType
objectInstance
The authorization object instance.
rights
The rights to check for authorization.

Glossary Item Box

Checks if the identityName is authorized to perform a set of actions (as a rights mask) on an object.

Syntax

Visual Basic (Declaration) 
Public Overloads Function IsAuthorized( _
   ByVal identityName As String, _
   ByVal identityType As SourceCode.Authorization.Interfaces.IdentityType, _
   ByVal objectInstance As SourceCode.Authorization.Interfaces.IAuthorizationObject, _
   ByVal rights As Long _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As AuthorizationClient
Dim identityName As String
Dim identityType As SourceCode.Authorization.Interfaces.IdentityType
Dim objectInstance As SourceCode.Authorization.Interfaces.IAuthorizationObject
Dim rights As Long
Dim value As Boolean
 
value = instance.IsAuthorized(identityName, identityType, objectInstance, rights)
C# 
public bool IsAuthorized( 
   string identityName,
   SourceCode.Authorization.Interfaces.IdentityType identityType,
   SourceCode.Authorization.Interfaces.IAuthorizationObject objectInstance,
   long rights
)
C++/CLI 
public:
bool IsAuthorized( 
   String^ identityName,
   SourceCode.Authorization.Interfaces.IdentityType identityType,
   SourceCode.Authorization.Interfaces.IAuthorizationObject^ objectInstance,
   int64 rights
) 

Parameters

identityName
The name of the identity.
identityType
objectInstance
The authorization object instance.
rights
The rights to check for authorization.

Return Value

true if the identity is authorized for the specified rights on the object; otherwise false.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also