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,
	bool isAuthenticated
)
Visual Basic
Public Sub New ( 
	name As String,
	type As VGPermissionType,
	isAuthenticated As Boolean
)

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)
isAuthenticated
Type: System..::..Boolean
true to signify that the user is authenticated; otherwise, false.

Remarks

When isAuthenticated is equal to false, name is ignored.

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 permission 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