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

Function create_with_builtin_parent

nodedb/src/control/security/role.rs:416–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414
415 #[test]
416 fn create_with_builtin_parent() {
417 let store = RoleStore::new();
418 store
419 .create_role("senior_analyst", TenantId::new(1), Some("readonly"), None)
420 .unwrap();
421 let role = store.get_role("senior_analyst").unwrap();
422 assert_eq!(role.parent.as_deref(), Some("readonly"));
423 }
424
425 #[test]
426 fn create_with_custom_parent() {

Callers

nothing calls this directly

Calls 2

create_roleMethod · 0.80
get_roleMethod · 0.80

Tested by

no test coverage detected