Class PermissionHandler
public class PermissionHandler : AuthorizationHandler<PermissionRequirement>
- Inheritance
-
objectAuthorizationHandler<PermissionRequirement>PermissionHandler
Constructors
PermissionHandler(IHttpContextAccessor, IUserPermissions, ILogManager)
public PermissionHandler(IHttpContextAccessor accessor, IUserPermissions userPermissions, ILogManager logger)
Parameters
accessor
IHttpContextAccessoruserPermissions
IUserPermissionslogger
ILogManager
Methods
HandleRequirementAsync(AuthorizationHandlerContext, PermissionRequirement)
Makes a decision if authorization is allowed based on a specific requirement.
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, PermissionRequirement requirement)
Parameters
context
AuthorizationHandlerContextThe authorization context.
requirement
PermissionRequirementThe requirement to evaluate.
Returns
- Task