MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / implies

Method implies

atomic-identity/src/delegation.rs:118–130  ·  view source on GitHub ↗

Check if this permission implies another permission.

(&self, other: &DelegationPermission)

Source from the content-addressed store, hash-verified

116
117 /// Check if this permission implies another permission.
118 pub fn implies(&self, other: &DelegationPermission) -> bool {
119 match self {
120 DelegationPermission::Full => true,
121 DelegationPermission::Admin => matches!(
122 other,
123 DelegationPermission::Read
124 | DelegationPermission::ManageViews
125 | DelegationPermission::ManageTags
126 | DelegationPermission::Admin
127 ),
128 _ => self == other,
129 }
130 }
131
132 /// Get all standard permissions (excluding Full).
133 pub fn standard_permissions() -> &'static [DelegationPermission] {

Callers 1

has_permissionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected