Class PermissionLevelExtensions
- Namespace
- Dynamicweb.Security.Permissions
- Assembly
- Dynamicweb.Core.dll
Extension class for parsing permission levels.
public static class PermissionLevelExtensions
- Inheritance
-
PermissionLevelExtensions
- Inherited Members
Methods
HasPermission(PermissionLevel, PermissionLevel)
Checks if specified permission is allowed.
public static bool HasPermission(this PermissionLevel currentPermission, PermissionLevel requiredPermission)
Parameters
currentPermissionPermissionLevelCurrent permission level
requiredPermissionPermissionLevelPermissions to be tested against
Returns
- bool
true, if permission is allowed; otherwise,false
Merge(PermissionLevel, PermissionLevel?)
Merges two permission levels.
public static PermissionLevel? Merge(this PermissionLevel current, PermissionLevel? permission)
Parameters
currentPermissionLevelCurrent permission level
permissionPermissionLevel?Other permission level
Returns
- PermissionLevel?
Combined permission, if
permissionis notnull, otherwisecurrent