MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / actions_for_scopes

Method actions_for_scopes

crates/openshell-prover/src/credentials.rs:97–105  ·  view source on GitHub ↗

All actions enabled by the given scopes.

(&self, scopes: &[String])

Source from the content-addressed store, hash-verified

95impl ApiCapability {
96 /// All actions enabled by the given scopes.
97 pub fn actions_for_scopes(&self, scopes: &[String]) -> Vec<&ApiAction> {
98 let mut result = Vec::new();
99 for scope in scopes {
100 if let Some(actions) = self.scope_capabilities.get(scope) {
101 result.extend(actions.iter());
102 }
103 }
104 result
105 }
106
107 /// Write actions (POST, PUT, PATCH, DELETE) enabled by the given scopes.
108 pub fn write_actions_for_scopes(&self, scopes: &[String]) -> Vec<&ApiAction> {

Callers 2

Calls 1

getMethod · 0.45

Tested by

no test coverage detected