Should not allow to add ITIL or Admin roles to Contact users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 05:35 AM
If I try to add itil or admin role to Contact users, I want to abort the action. Kindly assist me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 06:33 AM
Hi @Sarah Bouil,
Achieved easily by implementing the below Business Rule on the 'sys_user_has_role' table as shown below:
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 06:49 AM
Thank you for your quick reply. Also I want restrict from Group too. The ITIL or Admin role will inherit from group also right. Should restrict it. How to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 07:01 AM
Hi @Sarah Bouil
You can use advance script section as well to add condition to check if user is member of particular group or not
gs.getUser().isMemberOf('<add you group name'>)
Then in business rule script section use
current.setAbortAction(true);
This will definitely helps you to resolved your issue. Let me know in case you need to understand the flow or you can DM on LinkedIn.
If this solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.
Best Regards,
Krushna Birla
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 07:04 AM
<add you group name> I can add if it's a one group. But it should be verify dynamically. I should not hordcoded the group name. There might be many groups which contains ITIL right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 07:09 AM
I dont think you need to think of groups here. Just by adding roles in condition as said earlier this will fulfil your requirement. As script will validate for only those user having role in itil and admin no matter which group user is part of.
I would say, please try previous solution once and check for different users. It should work.
This will definitely helps you to resolved your issue. Let me know in case you need to understand the flow or you can DM on LinkedIn.
If this solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.
Best Regards,
Krushna Birla