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: 2016.0.105.16 (2016.0.105.16)

Syntax

C#
public VGPrincipalPermission(
	string name,
	VGPermissionType type
)
Visual Basic
Public Sub New ( 
	name As String,
	type As VGPermissionType
)

Parameters

name
Type: System..::..String
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.Security..::..VGPermissionType
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