PermissionService.HasPermission Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Overloads

HasPermission(IEntity, Permission, User) Check if the specified user has the requested permission to the specified entity.
HasPermission(Permission, User) Check if the specified user has the requested system permission.

HasPermission(IEntity, Permission, User)

Check if the specified user has the requested permission to the specified entity.

public static bool HasPermission(IEntity entity, Permission requested, User user = null)

Parameters

entity
IEntity

The entity to check.

requested
Permission

The requested permission.

user
User

Returns

bool

HasPermission(Permission, User)

Check if the specified user has the requested system permission.

public static bool HasPermission(Permission requested, User user = null)

Parameters

requested
Permission

The requested permission.

user
User

Returns

bool