Interface ICallerMailAccountCatalog
- Namespace
- MailFathom.Application.Accounts
- Assembly
- MailFathom.Application.dll
Describes the mail accounts the user this unit of work is acting for is assigned, and no others.
public interface ICallerMailAccountCatalog
Remarks
Every caller-facing use case that resolves an account asks this rather than the deployment's own catalog. A query use case asks it before it reads anything, and it asks for two reasons. An account this user is not assigned is refused exactly as one nobody configured, because a refusal that separated the two would tell a caller which accounts exist beside their own. And a request that names no account is narrowed to this set rather than left unrestricted, because an unbounded read would publish every user's mail rather than merely the mail of an account an operator has since removed.
A user assigned nothing answers with an empty set, and that is a real answer rather than an absent one: the resolution turns it into a scope that reads nothing, never into an unrestricted query. A principal acting for no user at all is a different case and is refused rather than answered — the deployment administrator and this process's own identity reach this port only by mistake, and an empty answer would let that mistake look like a user with no mail.
The set is published to a caller in one place and one only: the tool that exists to say which accounts they may name. Every other use of it is a bound on a query rather than an answer, and what a caller learns there is still only whether the account it named was accepted.
Properties
- SynchronizationEnabled
Gets whether this deployment refreshes the local copy of these accounts at all.
- User
Gets the user this unit of work is acting for, whose assignments decide what every read narrowed here returns.
Methods
- ReadAssignedAccountsAsync(CancellationToken)
Reads the accounts the user in hand is assigned, deduplicated and ordered, or empty when they are assigned none.