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 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 moreSource§impl Debug for ApproveScope
impl Debug for ApproveScope
Source§impl Default for ApproveScope
impl Default for ApproveScope
Source§fn default() -> ApproveScope
fn default() -> ApproveScope
Source§impl<'de> Deserialize<'de> for ApproveScope
impl<'de> Deserialize<'de> for ApproveScope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ApproveScope
Source§impl PartialEq for ApproveScope
impl PartialEq for ApproveScope
Source§impl Serialize for ApproveScope
impl Serialize for ApproveScope
impl StructuralPartialEq for ApproveScope
Auto Trait Implementations§
impl Freeze for ApproveScope
impl RefUnwindSafe for ApproveScope
impl Send for ApproveScope
impl Sync for ApproveScope
impl Unpin for ApproveScope
impl UnsafeUnpin for ApproveScope
impl UnwindSafe for ApproveScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
impl<'de, T, C> DeserializeTyped<'de, C> for Twhere
T: Deserialize<'de>,
fn deserialize_typed<S>(
_: &C,
deserializer: S,
) -> Result<T, <S as Deserializer<'de>>::Error>where
S: Deserializer<'de>,
impl<T, U> DeserializeTypedOwned<T> for Uwhere
U: for<'de> DeserializeTyped<'de, T>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere
T: Default,
Source§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
T.