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

Method implies

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

Check if this permission implies another permission.

(&self, other: &DelegationPermission)

Source from the content-addressed store, hash-verified

108
109 /// Check if this permission implies another permission.
110 pub fn implies(&self, other: &DelegationPermission) -> bool {
111 match self {
112 DelegationPermission::Full => true,
113 DelegationPermission::Admin => matches!(
114 other,
115 DelegationPermission::Read
116 | DelegationPermission::ManageStacks
117 | DelegationPermission::ManageTags
118 | DelegationPermission::Admin
119 ),
120 _ => self == other,
121 }
122 }
123
124 /// Get all standard permissions (excluding Full).
125 pub fn standard_permissions() -> &'static [DelegationPermission] {

Callers 1

has_permissionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected