RoleHierarchy
RoleHierarchy ¶
a class based approach to handling role hierarchy
calc_role
async
¶
calc_role(
current_role_id,
new_role_name,
auth,
hierarchy_delimiter=" - h",
is_alter_system_roles: bool = False,
)
compares current role to new role hierarchy and returns the higher one. will not adjust system roles
Source code in src/crew_dcs/integrations/RoleHierarchy.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
get_roles_w_hierarchy
async
¶
get_roles_w_hierarchy(
auth,
hierarchy_delimiter=" - h",
debug_api: bool = False,
)
gets instance roles and adds an attribute hierarchy
Source code in src/crew_dcs/integrations/RoleHierarchy.py
27 28 29 30 31 32 33 34 35 36 37 38 39 | |