VGIPrincipalGetPermission Method (String)
|
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
)
Function GetPermission (
fullname As String
) As VGIPermission
Parameters
- fullname
- Type: SystemString
The full name of the permission, including the folder path.
Return Value
Type:
VGIPermissionThe 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)
{
}
Else
{
string myValue (string)myPerm[myValue];
}
Dim myPerm as VGIPermission = VGSecurityManager.Principal.GetPermission("My permission")
If myPerm is Nothing Then
Else
Dim myValue as String = CType(myPerm(myValue), String)
End If
The following example gets the permission "Disable Edition" contained in the folder "Customer".
VGSecurityManager.Principal.GetPermission(@"\Customers\Disable Edition")
See Also