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

Method get_role

nodedb/src/control/security/role.rs:314–317  ·  view source on GitHub ↗

Look up a custom role by name. Returns None if not found.

(&self, name: &str)

Source from the content-addressed store, hash-verified

312
313 /// Look up a custom role by name. Returns None if not found.
314 pub fn get_role(&self, name: &str) -> Option<CustomRole> {
315 let roles = self.roles.read().ok()?;
316 roles.get(name).cloned()
317 }
318
319 /// List all custom roles.
320 pub fn list_roles(&self) -> Vec<CustomRole> {

Callers 12

has_roleMethod · 0.80
create_roleFunction · 0.80
alter_roleFunction · 0.80
drop_roleFunction · 0.80
alter_role_typedFunction · 0.80
set_role_parentFunction · 0.80
grant_roleFunction · 0.80
revoke_roleFunction · 0.80
revoke_role_from_roleFunction · 0.80
canonicalize_granteeFunction · 0.80

Calls 3

okMethod · 0.45
readMethod · 0.45
getMethod · 0.45

Tested by 3

has_roleMethod · 0.64