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

Method build

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

Build the delegation scope.

(mut self)

Source from the content-addressed store, hash-verified

496
497 /// Build the delegation scope.
498 pub fn build(mut self) -> DelegationScope {
499 // A scope with no permissions would authorize nothing; read is the
500 // floor, matching `DelegationScope::default()`.
501 if self.permissions.is_empty() {
502 self.permissions.push(DelegationPermission::Read);
503 }
504
505 DelegationScope {
506 permissions: self.permissions,
507 servers: self.servers,
508 workspaces: self.workspaces,
509 projects: self.projects,
510 views: self.views,
511 max_changes: self.max_changes,
512 description: self.description,
513 }
514 }
515}
516
517/// A delegation authorizing an agent to act on behalf of a user.

Calls 2

is_emptyMethod · 0.45
pushMethod · 0.45