Constructor Role
- Namespace
- MailFathom.Application.Access.Grants
- Assembly
- MailFathom.Application.dll
Role(Guid, string, RolePermissions, DateTimeOffset)
One role: a name unique across the deployment and the list of permissions it grants, written as names and patterns.
public Role(Guid Id, string Name, RolePermissions Permissions, DateTimeOffset CreatedAt)
Parameters
IdGuidThe identifier every assignment of the role names it by.
NamestringThe name an operator reads the role by.
PermissionsRolePermissionsWhat the role grants wherever it is assigned, and any stored entry that grants nothing in this build.
CreatedAtDateTimeOffsetWhen the role was recorded.
Remarks
No use case asks whether a caller holds a role: it checks a permission the role grants, so a role is one decision about many people written once. The one thing read off the role itself is whether its list widens on upgrade, which decides who may give it.