Carry the previous scope forward, replacing only what was named.
(&self, previous: &DelegationScope)
| 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( |
no test coverage detected