Struct DefinedRight
- Namespace
- Dynamicweb.Ecommerce.UserPermissions
- Assembly
- Dynamicweb.Ecommerce.dll
The DefinedRight class provides the information about defined permissions
[Serializable]
public struct DefinedRight
- Inherited Members
Constructors
DefinedRight(int, UserPermissionRights)
Initializes a new instance of the DefinedRight class
public DefinedRight(int userId, UserPermissionRights permissions)
Parameters
userIdint- The id of the user
permissionsUserPermissionRights- User permissions
DefinedRight(int, UserPermissionRights, string, bool)
Initializes a new instance of the DefinedRight class
public DefinedRight(int userId, UserPermissionRights permissions, string userName, bool isGroup)
Parameters
userIdint- The id of the user
permissionsUserPermissionRights- User permissions
userNamestring- The name of the user
isGroupboolTrueif it is group
Properties
CalculatedMaxPermissions
Returns the maximum possible numeric value for rights
public static int CalculatedMaxPermissions { get; }
Property Value
IsGroup
Return
True when it is grouppublic bool IsGroup { get; }
Property Value
Permissions
Gets or sets the permissions
public UserPermissionRights Permissions { get; set; }
Property Value
UserId
The id of the user
public int UserId { get; set; }
Property Value
UserName
Gets the name of the user
public string UserName { get; }
Property Value
Value
Gets the value of the permissions
public int Value { get; }
Property Value
Methods
get_Granted(UserPermissionRights)
Gets or sets the state of the defined permissions
[Obsolete("Use GetGranted instead")]
public bool get_Granted(UserPermissionRights permission)
Parameters
permissionUserPermissionRights- User permission
Returns
GetGranted(UserPermissionRights)
Gets the state of the defined permissions
public bool GetGranted(UserPermissionRights permission)
Parameters
permissionUserPermissionRights- User permission
Returns
GrantAll()
Provides all permissions
public void GrantAll()
GrantNone()
Provides no permissions
public void GrantNone()
set_Granted(UserPermissionRights, bool)
[Obsolete("Use SetGranted instead")]
public void set_Granted(UserPermissionRights permission, bool value)
Parameters
permissionUserPermissionRightsvaluebool
SetGranted(UserPermissionRights, bool)
Sets the state of the defined permissions
public void SetGranted(UserPermissionRights permission, bool value)
Parameters
permissionUserPermissionRights- User permission
valuebool- Granted state