Class MailRuleActionPermissions
- Namespace
- MailFathom.Application.Rules.Actions
- Assembly
- MailFathom.Application.dll
States which of the permitted mutations a rule may ask for on one account.
public sealed record MailRuleActionPermissions : IEquatable<MailRuleActionPermissions>
- Inheritance
-
MailRuleActionPermissions
- Implements
- Inherited Members
Remarks
What automation may do to a mailbox is the owner's decision rather than a rule's, so it is declared per account and per action instead of as one switch: an installation can run every rule it has with deletion refused, which is the case this exists for. A rule declaring an action its account does not permit is refused when the configuration is read rather than skipped later, because a rule that silently does nothing is indistinguishable from one that never matched.
Deletion is the one action that is opt-in. The others are reversible from an ordinary mail client — a message filed can be moved back, a copy removed, a flag cleared, a label taken off — and a deletion is the one that is not, so an account saying nothing about it means no.
The three keyword mutations share one switch, which is the one place the per-mutation shape is deliberately not followed. An owner deciding whether automation may label their mail is answering one question about one kind of value, and splitting it in three would offer a combination — may add, may not remove — whose only effect is mail accumulating labels nothing is allowed to take off again.
Constructors
- MailRuleActionPermissions(bool, bool, bool, bool, bool, bool)
States which of the permitted mutations a rule may ask for on one account.
Properties
- Default
Gets the permissions of an account that says nothing: every reversible change, and no deletion.
- PermitsCopy
Whether a rule may put a second occurrence into another folder.
- PermitsDelete
Whether a rule may remove mail from the folder it is in.
- PermitsRelocate
Whether a rule may move mail into another folder.
- PermitsSetFlagged
Whether a rule may set or clear the remote
\Flaggedflag.
- PermitsSetSeen
Whether a rule may set or clear the remote
\Seenflag.
- PermitsWriteKeywords
Whether a rule may add, remove, or replace the keywords of this account's mail.
Methods
- Permits(MailboxMutation)
Reports whether a rule on this account may ask for one mutation.