pub enum ApiKeyScope {
WorkflowsRead,
RunsRead,
RunsWrite,
RunsManage,
StatsRead,
Admin,
}Expand description
Permission scope for an API key.
Each scope grants access to a specific set of actions. A key with no scopes has no permissions.
Variants§
WorkflowsRead
Read workflow definitions.
RunsRead
Read runs and their steps.
RunsWrite
Create new runs (trigger workflows).
RunsManage
Cancel, approve, reject, retry runs.
StatsRead
Read aggregated statistics.
Admin
Full access to all operations.
Implementations§
Source§impl ApiKeyScope
impl ApiKeyScope
Sourcepub fn permits(&self, required: &ApiKeyScope) -> bool
pub fn permits(&self, required: &ApiKeyScope) -> bool
Check whether this scope grants the required permission.
Sourcepub fn has_permission(scopes: &[ApiKeyScope], required: &ApiKeyScope) -> bool
pub fn has_permission(scopes: &[ApiKeyScope], required: &ApiKeyScope) -> bool
Check whether a set of scopes grants the required permission.
Sourcepub fn all_non_admin() -> Vec<ApiKeyScope>
pub fn all_non_admin() -> Vec<ApiKeyScope>
All available scopes (excluding admin).
Trait Implementations§
Source§impl Clone for ApiKeyScope
impl Clone for ApiKeyScope
Source§fn clone(&self) -> ApiKeyScope
fn clone(&self) -> ApiKeyScope
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiKeyScope
impl Debug for ApiKeyScope
Source§impl<'de> Deserialize<'de> for ApiKeyScope
impl<'de> Deserialize<'de> for ApiKeyScope
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ApiKeyScope
impl Display for ApiKeyScope
Source§impl FromStr for ApiKeyScope
impl FromStr for ApiKeyScope
Source§impl Hash for ApiKeyScope
impl Hash for ApiKeyScope
Source§impl PartialEq for ApiKeyScope
impl PartialEq for ApiKeyScope
Source§impl Serialize for ApiKeyScope
impl Serialize for ApiKeyScope
impl Eq for ApiKeyScope
impl StructuralPartialEq for ApiKeyScope
Auto Trait Implementations§
impl Freeze for ApiKeyScope
impl RefUnwindSafe for ApiKeyScope
impl Send for ApiKeyScope
impl Sync for ApiKeyScope
impl Unpin for ApiKeyScope
impl UnsafeUnpin for ApiKeyScope
impl UnwindSafe for ApiKeyScope
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
Mutably borrows from an owned value. Read more