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

Method write_actions_for_scopes

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

Write actions (POST, PUT, PATCH, DELETE) enabled by the given scopes.

(&self, scopes: &[String])

Source from the content-addressed store, hash-verified

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> {
109 self.actions_for_scopes(scopes)
110 .into_iter()
111 .filter(|a| {
112 let m = a.method.to_uppercase();
113 m == "POST" || m == "PUT" || m == "PATCH" || m == "DELETE"
114 })
115 .collect()
116 }
117
118 /// Destructive actions (high or critical risk) enabled by the given scopes.
119 pub fn destructive_actions_for_scopes(&self, scopes: &[String]) -> Vec<&ApiAction> {

Callers 1

encode_credentialsMethod · 0.80

Calls 1

actions_for_scopesMethod · 0.80

Tested by

no test coverage detected