MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / resolve

Method resolve

nodedb/src/control/security/scope/store.rs:175–181  ·  view source on GitHub ↗

Resolve a scope to its full set of `(permission, collection)` grants. Recursively expands `INCLUDE` references. Detects cycles.

(&self, name: &str)

Source from the content-addressed store, hash-verified

173 ///
174 /// Recursively expands `INCLUDE` references. Detects cycles.
175 pub fn resolve(&self, name: &str) -> Vec<(String, String)> {
176 let scopes = self.scopes.read().unwrap_or_else(|p| p.into_inner());
177 let mut resolved = Vec::new();
178 let mut visited = std::collections::HashSet::new();
179 Self::resolve_recursive(&scopes, name, &mut resolved, &mut visited);
180 resolved
181 }
182
183 fn resolve_recursive(
184 scopes: &HashMap<String, ScopeDefinition>,

Callers 4

scope_grantsMethod · 0.45
scope_compositionFunction · 0.45
cycle_detectionFunction · 0.45
fetch_jwksFunction · 0.45

Calls 1

readMethod · 0.45

Tested by 2

scope_compositionFunction · 0.36
cycle_detectionFunction · 0.36