Click or drag to resize

IOperationServiceCheckPermission Method

Checks the user has the permission.

Namespace:  Resto.Front.Api
Assembly:  Resto.Front.Api.V8 (in Resto.Front.Api.V8.dll)
Syntax
C#
bool CheckPermission(
	IUser user,
	string permissionCode,
	IRole role = null
)

Parameters

user
Type: Resto.Front.Api.Data.SecurityIUser
User to get his permissions.
permissionCode
Type: SystemString
Permission code for check.
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 the permission, otherwise false.
Exceptions
ExceptionCondition
ArgumentExceptionPermission not found.
See Also