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

Method next_scope

atomic-cli/src/commands/identity/agent/renew.rs:187–196  ·  view source on GitHub ↗

Carry the previous scope forward, replacing only what was named.

(&self, previous: &DelegationScope)

Source from the content-addressed store, hash-verified

185
186 /// Carry the previous scope forward, replacing only what was named.
187 fn next_scope(&self, previous: &DelegationScope) -> CliResult<DelegationScope> {
188 let mut scope = previous.clone();
189 if let Some(can) = &self.can {
190 scope.permissions = parse_permissions(can)?;
191 }
192 if let Some(projects) = &self.projects {
193 scope.projects = parse_patterns(projects);
194 }
195 Ok(scope)
196 }
197
198 /// Publish for visibility. Never required for the grant to work.
199 async fn publish_grant(

Callers 1

executeMethod · 0.80

Calls 3

parse_permissionsFunction · 0.85
parse_patternsFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected