VGIPrincipalHasPermission Method (Guid)
|
Checks whether the specified permission is granted to the principal.
Namespace:
Novalys.VisualGuard.Security
Assembly:
Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax bool HasPermission(
Guid id
)
Function HasPermission (
id As Guid
) As Boolean
Parameters
- id
- Type: SystemGuid
The Visual Guard unique identifier of the permission
Return Value
Type:
Booleantrue if the principal has the permission, false otherwise
Examples The following example checks whether the permission "{AEE3A747-05FB-4f90-BD3A-EF872E4D3211}" is granted to the current user.
if (!VGSecurityManager.Principal.HasPermission(new Guid ("AEE3A747-05FB-4f90-BD3A-EF872E4D3211")))
{
}
If not VGSecurityManager.Principal.HasPermission(new Guid ("AEE3A747-05FB-4f90-BD3A-EF872E4D3211")) Then
End If
See Also