Click or drag to resize

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
)

Parameters

id
Type: SystemGuid
The Visual Guard unique identifier of the permission

Return Value

Type: Boolean
true 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")))
{
    // the permission is not granted ...
}
See Also