ECommerceHelperIsUserAuthorizedForDepartment Method |
Checks whether the user is authorized to access products from the specified department.
Returns true if user is global admin or is granted with 'AccessAllDepartments' e-commerce module permission or he is administrator of the given department.
Namespace: CMS.EcommerceAssembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 9.0.0
Syntax public static bool IsUserAuthorizedForDepartment(
int departmentId,
string siteName,
IUserInfo user
)
Parameters
- departmentId
- Type: SystemInt32
ID of the department - siteName
- Type: SystemString
Site name - user
- Type: CMS.BaseIUserInfo
User to be checked
Return Value
Type:
BooleanSee Also