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
currentPermission
PermissionLevelCurrent permission level
requiredPermission
PermissionLevelPermissions 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
current
PermissionLevelCurrent permission level
permission
PermissionLevel?Other permission level
Returns
- PermissionLevel?
Combined permission, if
permission
is notnull
, otherwisecurrent