- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2023 09:55 AM - edited 08-02-2023 05:36 AM
Hi Everyone,
I need help with this topic. The requirement is about restricting the edition of the Project form when a Group is assigned.
We have a group called BU Department, an inside this group we have BU Leaders y BU users. In BU Leaders we have thee Project Manager Leader, and in BU users we have group of Project Managers that are part of this department.
The complexity is that the group we assign in "Assignment group field" is BU Department. In other words, I need an script that analyze the field (the assignement group) and grants "edit" permissions to those who are part of the group BU Leaders only. The BU user will have edit permission only when he is assigned as a Project Manager in the field "Project Manager". This last part i got it, but i need help for the first(BU Leaders).
var pmoLeaders = new GlideRecord('sys_user_grmember');
pmoLeaders.addQuery('group', pm_project.assignment_group);
pmoLeaders.addQuery('user', gs.getUserID());
pmoLeaders.query();
if (pmoLeaders.hasNext()) {
answer=true;
}
This script only analyze the current assigned group, if we assign BU Leaders as a group it would works. But we assign department, so why I have to modify it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 05:33 AM - edited 08-02-2023 05:34 AM
A better solution found was using ACLs, Operation: write, Roles, and conditioning them with: Assignment group is (dynamic) One of my Groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 05:33 AM - edited 08-02-2023 05:34 AM
A better solution found was using ACLs, Operation: write, Roles, and conditioning them with: Assignment group is (dynamic) One of my Groups.