Interface IOrganizationStore
- Namespace
- MailFathom.Application.Access.Organizations
- Assembly
- MailFathom.Application.dll
Where the organizations a deployment groups its users into are kept, and which one each user belongs to.
public interface IOrganizationStore
Remarks
Every write answers an outcome rather than raising for the refusals an administrator meets in ordinary use — a short name another organization holds, an organization that still has members, a username the target organization already holds — because each is decided by the database at the moment of the write rather than by a read a moment earlier.
A password credential names the organization it is scoped to by identifier, so a short name changes without rewriting any credential, and moving a user re-scopes their password credentials in the same transaction that moves them.
Methods
- ChangeShortNameAsync(Guid, OrganizationShortName, CancellationToken)
Replaces the short name an organization's members sign in under.
- CreateAsync(Guid, string, OrganizationShortName, DateTimeOffset, CancellationToken)
Records an organization.
- DeleteAsync(Guid, CancellationToken)
Removes an organization that has neither members nor mail accounts.
- ReadAsync(AdministrativeListingQuery, IReadOnlySet<AssignmentScope>, CancellationToken)
Reads one page of the organizations some scopes cover, in identifier order.
- ReadUnreadableAsync(IReadOnlySet<AssignmentScope>, CancellationToken)
Reads every organization row some scopes cover that this build will not read as one.
- RenameAsync(Guid, string, CancellationToken)
Replaces the name an operator reads an organization by.
- SetMailAccountOrganizationAsync(Guid, Guid?, bool, CancellationToken)
Moves a mail account into an organization or out of every organization.
- SetUserOrganizationAsync(UserId, Guid?, CancellationToken)
Moves a user into an organization or out of every organization, re-scoping their password credentials with them.