Class EcommercePermissionHelper
- Namespace
- Dynamicweb.Ecommerce.UserPermissions
- Assembly
- Dynamicweb.Ecommerce.dll
public class EcommercePermissionHelper
- Inheritance
-
EcommercePermissionHelper
- Inherited Members
Fields
FieldPermissionName
public const string FieldPermissionName = "ShopField"
Field Value
Properties
UseNewPermission
Defines if new or old permission model should be used.
public static bool UseNewPermission { get; }
Property Value
Methods
DeleteGroupRights(string)
Deletes all permissions for the group
public static void DeleteGroupRights(string groupId)
Parameters
groupId
string- The id of the group
GetPermission(IPermissionControlled, User, bool)
Get current user permissions to the node with specified id and type.
public static PermissionLevel GetPermission(IPermissionControlled permissionObject, User user, bool checkNoPermissions = false)
Parameters
permissionObject
IPermissionControlled- The permission object
user
User- The user.
checkNoPermissions
bool- Specifies whether to check if no permissions were defined on a specified object at all (in this case the method will return "False").
Returns
GetPermission(string, string, User, bool)
Get current user permissions to the node with specified id and type.
[Obsolete("Use 'GetPermission(IPermissionControlled, User,Boolean)' instead")]
public static PermissionLevel GetPermission(string id, string objectType, User user, bool checkNoPermissions = false)
Parameters
id
string- Node ID.
objectType
string- Type of the object.
user
User- The user.
checkNoPermissions
bool- Specifies whether to check if no permissions were defined on a specified object at all (in this case the method will return "False").
Returns
GetPermission(string, string, bool)
Get current user permissions to the node with specified id and type.
public static PermissionLevel GetPermission(string id, string objectType, bool checkNoPermissions = false)
Parameters
id
string- Node ID.
objectType
string- Type of the object.
checkNoPermissions
bool- Specifies whether to check if no permissions were defined on a specified object at all (in this case the method will return "False").
Returns
GetPermissionObject(string, string, IPermissionControlled)
Get permission controlled object with specified id and type.
public static IPermissionControlled GetPermissionObject(string id, string objectType, IPermissionControlled parent = null)
Parameters
id
string- Node ID.
objectType
string- Type of the object.
parent
IPermissionControlled
Returns
HasAccess(IPermissionControlled)
Determines whether current user has access to the group.
public static bool HasAccess(IPermissionControlled permissionObject)
Parameters
permissionObject
IPermissionControlled- The group.