Click or drag to resize

VGPrincipalPermission Constructor (String, VGPermissionType)

Initializes a new instance of the VGPrincipalPermission class for the specified role or permission.

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax
public VGPrincipalPermission(
	string name,
	VGPermissionType type
)

Parameters

name
Type: SystemString
The name of the role or the fullname of the permission for which to check membership. This value is not case sensitive.
type
Type: Novalys.VisualGuard.SecurityVGPermissionType
the type of the item to check (role or permission)
Remarks
When the user is not authenticated the permission will throw a security exception.

If you want to check a permission, you have to use the full name of the permission. When the permission is stored in the root permission folder, the full name of the permission is equal to the permisison name. When the permission is stored in a sub permission folder, the full name is equal to "\<sub folder name>\<\...\permission name name>".

For example the full name of the "Disallow to administrate customers" permission stored in the "Customers" folder is equal to "\Customers\Disallow to administrate customers"

.
See Also