Skip to main content

Module overrides

Module overrides 

Source
Expand description

Override validation and override-edit checks (permissions §1.2, §2.2, §2.4, §4.4).

Enums§

OverrideSubject
The target of an override as the hierarchy sees it.
OverrideWrite
What the host does with a validated override.

Functions§

adopt_parent
Setting sync_with_parent = true (§2.4): checked as an override edit from the channel’s own overrides to the parent’s, for every target in either. subject maps a target to its hierarchy view; None (a deleted role or member) is skipped.
override_edit
One override edit in channel.permissions.update (or channel.create with initial overrides). chp is the actor’s effective permissions in that channel; old/new are (allow, deny) with (0, 0) for none. A role target needs H4; a member target H1 and H2 unless self. H3: the changed bits must be in chp (owner and administrator exempt).
validate_override
Validates a new override value against the stored one (old, if any): allow & deny == 0; no known bit outside CHANNEL_SCOPED; no unknown bit that old did not already hold. Unknown bits already present pass through unchanged.