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  IUser
User to get his permissions.
permissionCode  String
Permission code for check.
role  IRole  (Optional)
User role to get user permissions. If null, check all roles available to the user.

Return Value

Boolean
True if the user has the permission, otherwise false.
Exceptions
ExceptionCondition
ArgumentExceptionPermission not found.
See Also