pub enum ApprovalScope {
Once,
Stage,
Run,
}Expand description
How far an approval reaches.
The three scopes are what a person actually wants to say. Once is “I read
this one”. Stage is “keep going through the work I just approved”, which
expires when the run moves on to different work. Run is “I trust this for
the whole task”. Nothing persists past the run: a grant written to disk
would outlive the reason the user made it.
What a grant covers is a set of keys derived from the call, not the tool
name - see leviath_cli::shell_keys.
Variants§
Once
Just this one call.
Stage
Every later call this covers, until the run leaves the current stage.
Run
Every later call this covers, for the rest of the run.
Serialized as session, which is the name every client already sends:
lev respond --session, the REST "scope": "session", and the ACP
allow-always option all mean this.
Trait Implementations§
Source§impl Clone for ApprovalScope
impl Clone for ApprovalScope
Source§fn clone(&self) -> ApprovalScope
fn clone(&self) -> ApprovalScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ApprovalScope
Source§impl Debug for ApprovalScope
impl Debug for ApprovalScope
Source§impl<'de> Deserialize<'de> for ApprovalScope
impl<'de> Deserialize<'de> for ApprovalScope
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 ApprovalScope
Source§impl PartialEq for ApprovalScope
impl PartialEq for ApprovalScope
Source§impl Serialize for ApprovalScope
impl Serialize for ApprovalScope
impl StructuralPartialEq for ApprovalScope
Auto Trait Implementations§
impl Freeze for ApprovalScope
impl RefUnwindSafe for ApprovalScope
impl Send for ApprovalScope
impl Sync for ApprovalScope
impl Unpin for ApprovalScope
impl UnsafeUnpin for ApprovalScope
impl UnwindSafe for ApprovalScope
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.