Click or drag to resize

VGIPrincipalGetPermission Method (String)

Gets the specified VGIPermission object.

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax
VGIPermission GetPermission(
	string fullname
)

Parameters

fullname
Type: SystemString
The full name of the permission, including the folder path.

Return Value

Type: VGIPermission
The specified VGIPermission object if the permission is granted to the principal. Returns null (Nothing in VB) if the permission is not granted or it does not exist.
Remarks
this method is not case sensitive
Examples
The following example gets the permission "My permission" stored in the root of permissions.
VGIPermission myPerm = VGSecurityManager.Principal.GetPermission("My permission")
if (myPerm == null)
{
    // the permission is not granted ...
}
Else
{
    string myValue (string)myPerm[myValue];
}
The following example gets the permission "Disable Edition" contained in the folder "Customer".
C#
VGSecurityManager.Principal.GetPermission(@"\Customers\Disable Edition")
See Also