Click or drag to resize

IOperationServiceCheckPermissions Method

Checks the user has permissions.

Namespace:  Resto.Front.Api
Assembly:  Resto.Front.Api.V7 (in Resto.Front.Api.V7.dll)
Syntax
C#
bool CheckPermissions(
	IUser user,
	string[] permissionCodes,
	PermissionsCheckMode checkMode,
	IRole role = null
)

Parameters

user
Type: Resto.Front.Api.Data.SecurityIUser
User to get his permissions.
permissionCodes
Type: SystemString
Permission codes for check.
checkMode
Type: Resto.Front.ApiPermissionsCheckMode
Permission codes check mode.
role (Optional)
Type: Resto.Front.Api.Data.SecurityIRole
User role to get user permissions. If null, check all roles available to the user.

Return Value

Type: Boolean
True if the user has permissions, otherwise false.
Exceptions
ExceptionCondition
ArgumentExceptionPermissions not found.
See Also