Skip to content

Commit 9842f77

Browse files
authored
Create README.md
1 parent 56aef89 commit 9842f77

File tree

1 file changed

+76
-0
lines changed
  • Server-Side Components/Background Scripts/Get All Child Roles

1 file changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Use this script to get a flattened array of all Roles contained by a specificed role.
2+
This will recursively drill down into other contained roles so you have the full list of roles involved in the hierarchy.
3+
4+
To use, you can set the "roleNameOrSysId" variable to either a role name or the Sys ID from the "sys_user_role" table
5+
Or call the "getFullRoleHierarchyList" function directly and pass in a role name or Sys ID
6+
7+
The following lines exist just to print out the results for your testing. Remove this if needed:
8+
9+
for (var i = 0; i < result.length; i++) {
10+
gs.info(result[i]);
11+
}
12+
13+
14+
15+
- Example input: "it_project_manager"
16+
17+
- List of chiold roles found in the Related List for "it_project_manager":
18+
19+
resource_user
20+
idea_manager
21+
it_demand_manager
22+
pa_viewer
23+
it_project_user
24+
project_manager
25+
timeline_user
26+
27+
- Example output and full list of nested child roles for "it_project_manager":
28+
29+
resource_user
30+
report_group
31+
report_user
32+
viz_creator
33+
skill_user
34+
idea_manager
35+
it_demand_manager
36+
it_project_user
37+
it_project_portfolio_user
38+
project_portfolio_user
39+
sn_gf.goal_user
40+
sn_gf.goal_user_read
41+
sn_gf.strategy_planner_read
42+
it_demand_user
43+
demand_user
44+
baseline_user
45+
pps_resource
46+
project_user
47+
timecard_user
48+
sn_test_management.tester
49+
planning_console_user
50+
task_editor
51+
sn_gf.strategy_planner
52+
timeline_user
53+
demand_manager
54+
scrum_user
55+
cmdb_read
56+
scrum_admin
57+
rm_scrum_task_admin
58+
rm_doc_admin
59+
rm_task_admin
60+
rm_test_admin
61+
rm_story_admin
62+
rm_epic_admin
63+
rm_release_scrum_admin
64+
rm_sprint_admin
65+
view_changer
66+
financial_mgmt_user
67+
fiscal_calendar_user
68+
sn_invst_pln.std_user
69+
rate_model_user
70+
sn_invst_pln_v2.investment_user
71+
sn_invst_pln_investment_user
72+
currency_instance_report_admin
73+
pa_viewer
74+
project_manager
75+
timecard_approver
76+
sn_test_management.test_manager

0 commit comments

Comments
 (0)