Table of Contents

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

userId int
The id of the user
permissions UserPermissionRights
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

userId int
The id of the user
permissions UserPermissionRights
User permissions
userName string
The name of the user
isGroup bool
True if it is group

Properties

CalculatedMaxPermissions

Returns the maximum possible numeric value for rights
public static int CalculatedMaxPermissions { get; }

Property Value

int

IsGroup

Return True when it is group
public bool IsGroup { get; }

Property Value

bool

Permissions

Gets or sets the permissions
public UserPermissionRights Permissions { get; set; }

Property Value

UserPermissionRights

UserId

The id of the user
public int UserId { get; set; }

Property Value

int

UserName

Gets the name of the user
public string UserName { get; }

Property Value

string

Value

Gets the value of the permissions
public int Value { get; }

Property Value

int

Methods

get_Granted(UserPermissionRights)

Gets or sets the state of the defined permissions
[Obsolete("Use GetGranted instead")]
public bool get_Granted(UserPermissionRights permission)

Parameters

permission UserPermissionRights
User permission

Returns

bool

GetGranted(UserPermissionRights)

Gets the state of the defined permissions
public bool GetGranted(UserPermissionRights permission)

Parameters

permission UserPermissionRights
User permission

Returns

bool

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

permission UserPermissionRights
value bool

SetGranted(UserPermissionRights, bool)

Sets the state of the defined permissions
public void SetGranted(UserPermissionRights permission, bool value)

Parameters

permission UserPermissionRights
User permission
value bool
Granted state
To top