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

Function scope_grants_check

nodedb/src/control/security/scope/store.rs:319–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

317
318 #[test]
319 fn scope_grants_check() {
320 let store = ScopeStore::new();
321 store
322 .define(
323 "profile:read",
324 vec![("read".into(), "profiles".into())],
325 vec![],
326 "admin",
327 )
328 .unwrap();
329
330 assert!(store.scope_grants("profile:read", "read", "profiles"));
331 assert!(!store.scope_grants("profile:read", "write", "profiles"));
332 }
333
334 #[test]
335 fn include_validation() {

Callers

nothing calls this directly

Calls 1

defineMethod · 0.45

Tested by

no test coverage detected