- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi Community!
I was wondering if anyone can help me find where is the logic behind the actions on the unassigned tasks on the Resource Management Workspace:
I need to restrict the "Assign work" action to only be visible for RESOURCE MANAGERS and not project managers.
Thank you very much !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello Gaspar,
You can use ACLs to restrict this access. However, ACLs are not currently working on the Resource Management Workspace.
You can do the following:
- Create ACLs and review if the behaviour is working as you need in the classic view.
- Activate ACLs in the Resource Management Workspace.
a.Modify the function "getAssignmentData" of "RMWorkspaceDataFetchSNC" script. After the block of code to set the variable "row._metadata …" (line 194-205), you can add something like this:
/* If Resource Manager can only update the status of the RA, then you can use this to restrict the Assign work button */
row._metadata.canAssignWork = true;
if (!asmtGr.resource_status.canWrite()) { // This checks the ACLs
row._metadata.canAssignWork = false;
}or another example which uses roles:
row._metadata.canAssignWork = true;
if (!gs.hasRole('resource_manager')) {
row._metadata.canAssignWork = false;
}
b.You will also need to customise the function "_getBottomGridRowActions" of the script "RMWorkspaceServiceSNC". Add the criteria in the assign work button:
if(canWrite && canCreate) {
bottomGridRowActions.push(
{
"actionName": "assign_work",
"id": "assign_work",
"label": gs.getMessage("Assign work"),
"name": gs.getMessage("Assign work"),
"criteria": '_metadata.canAssignWork=true'
}
);
}
To customise these functions you have to use the scripts RMWorkspaceDataFetch and RMWorkspaceService.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello Gaspar,
You can use ACLs to restrict this access. However, ACLs are not currently working on the Resource Management Workspace.
You can do the following:
- Create ACLs and review if the behaviour is working as you need in the classic view.
- Activate ACLs in the Resource Management Workspace.
a.Modify the function "getAssignmentData" of "RMWorkspaceDataFetchSNC" script. After the block of code to set the variable "row._metadata …" (line 194-205), you can add something like this:
/* If Resource Manager can only update the status of the RA, then you can use this to restrict the Assign work button */
row._metadata.canAssignWork = true;
if (!asmtGr.resource_status.canWrite()) { // This checks the ACLs
row._metadata.canAssignWork = false;
}or another example which uses roles:
row._metadata.canAssignWork = true;
if (!gs.hasRole('resource_manager')) {
row._metadata.canAssignWork = false;
}
b.You will also need to customise the function "_getBottomGridRowActions" of the script "RMWorkspaceServiceSNC". Add the criteria in the assign work button:
if(canWrite && canCreate) {
bottomGridRowActions.push(
{
"actionName": "assign_work",
"id": "assign_work",
"label": gs.getMessage("Assign work"),
"name": gs.getMessage("Assign work"),
"criteria": '_metadata.canAssignWork=true'
}
);
}
To customise these functions you have to use the scripts RMWorkspaceDataFetch and RMWorkspaceService.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Once again THANK YOU @Patricia9 !!! This was a GREAT help!! Thank youuuuu!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi,
Field level ACLs will work from Q4'2025 release.