Click or drag to resize
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.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 8.2.23
Syntax
C#
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: Boolean
See Also