Class OwnClientPreferences
- Namespace
- MailFathom.Application.Preferences
- Assembly
- MailFathom.Application.dll
Reads and replaces the signed-in person's own client preferences.
public sealed class OwnClientPreferences
- Inheritance
-
OwnClientPreferences
- Inherited Members
Remarks
Whose preferences these are comes from the principal rather than from the request, exactly as it does for the user record: there is no argument here for another user's identifier, so a request about somebody else is something a caller cannot express rather than something a surface has to refuse.
Reading is admitted under ProfileRead and the write under ProfileWrite. The write is deliberately not MailAccountsWrite: that grant decides what this deployment reads out of somebody's mailboxes, somebody whose mail configuration an administrator maintains in full does not hold it, and hanging a person's own telemetry switch on it would let a grant they do not hold over their mail configuration decide what may be said about them. Nor is it an administrative grant, since nothing here reaches beyond the caller.
A read answers a document whatever the deployment holds, because a person who has set nothing wants the defaults drawn rather than an error. A write reports whether there was a user to write for, which is the one case the two differ on and is a user erased under a credential that has not yet been withdrawn.
Constructors
- OwnClientPreferences(AccessAuthorization, IClientPreferencesStore)
Initializes the use case.
Methods
- ReadAsync(CancellationToken)
Reads what the signed-in person set about their own client.
- ReadTelemetryAnswerToCarryAsync(CancellationToken)
Reads the answer the signed-in person stored for the telemetry switch, for a write that carries it forward rather than deciding it.
- SaveAsync(ClientPreferences, CancellationToken)
Replaces what the signed-in person set about their own client.