- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2017 11:08 PM
Hi All,
I am creating an ACL to restrict a user with a custom role to access and update Incident records.
I have tried to create a Read ACL rule with the following configurations:
However, if i tried to impersonate a user with a 'bu_itil' role, those 3 records does not display on the incident list.
I have also tried to script the condition but it is not evaluated when I checked it on the debug logs.
Maybe you guys can help me out on this . TIA.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 03:58 AM
Hi Amlan,
I used the code you have provided, however it did not provide me the right results.
But, I tried to tweak the code based on what you have provided and it does the trick.
Thanks for the help.
Regards,
JM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 02:37 AM
Hi Joe,
I'm Glad it helped you.
May I consider that the issue is resolved? If so, please mark the Answer Correct and Close the thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 02:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 03:16 AM
Hi Joe,
Okay. It's clear now. You may obtain this by using the same Business rule, i.e., incident query. Please use the modified script given below:
if (!(gs.hasRole("itil") || gs.hasRole("test")) && gs.isInteractive()) {
var u = gs.getUserID();
var qc = current.addQuery("caller_id", u).addOrCondition("opened_by", u).addOrCondition("watch_list", "CONTAINS", u);
gs.print("query restricted to user: " + u);
}
else if(gs.hasRole("bu_itil")){
//Please pass the exact Field Name of 'Business Unit' and also the value of 'RRG' in the below line
current.addQuery("field_name_of_Business_Unit", 'Value_of_RRG');
}
I hope this helps. Please mark correct/helpful based on impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 03:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 04:05 AM
Hi Joe,
Glad to know that you have achieved the requirement.
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please reviewHow to Mark Answers Correct From Inbox View