pub enum ApproveScope {
None,
All,
Contexts(Vec<String>),
}Expand description
A DID’s authority to confer access through an approval — task-consent
delegation (compute_delegated_contexts) and delegated step-up ratification
(delegated_any_approver_covers) — without any authority to act.
Read only by those two conferral paths; it never feeds require_admin or
has_context_access, so an approver can bless a change in a context while
being unable to make one. This is the axis that lets an approver be
least-privilege: role: Reader, allowed_contexts: [] (acts nowhere),
approve_scope: All (may authorize anywhere).
Default ApproveScope::None: an entry confers nothing unless explicitly
granted this — strictly additive and fail-closed. Pre-existing rows omit the
field and deserialise as None.
Variants§
None
Confers nothing (the default).
All
May confer any context — a cross-context authorizer. Granting this is
super-admin-only (see vti_common::acl::validate_approve_scope_grant).
Contexts(Vec<String>)
May confer these contexts (and their subtrees), and only these.
Implementations§
Source§impl ApproveScope
impl ApproveScope
Sourcepub fn covers(&self, context_id: &str) -> bool
pub fn covers(&self, context_id: &str) -> bool
Whether an approval by a holder of this scope may confer context_id.
Segment-aware ancestry, matching AuthClaims::has_context_access, so an
approver scoped to a parent context covers its whole subtree.
Sourcepub fn confers_nothing(&self) -> bool
pub fn confers_nothing(&self) -> bool
Whether this scope confers nothing.
Trait Implementations§
Source§impl Clone for ApproveScope
impl Clone for ApproveScope
Source§fn clone(&self) -> ApproveScope
fn clone(&self) -> ApproveScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more