Namespace Signal.Application.Roles
Classes
- RequireRoleAttribute
The sender must have at least one of the given roles, as decided by the registered IRoleProviders (by default:
Signal:Commands:Roles,Signal:Commands:Adminsfor Admin, and Signal group admins for GroupAdmin).
- Role
Built-in role names. Role names are compared case-insensitively.
Interfaces
- IRoleProvider
Decides whether a message's sender has a role. Several providers can be registered (e.g. configuration plus a database); a role is granted if any of them grants it. Register with
AddRoleProvider<T>(); providers are resolved from the message scope, so they may use scoped services.
- IRoleService
Checks roles across all registered IRoleProviders.