
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 05:01 AM
I am trying to restrict access to certain SC_TASK to users of various groups and/or roles.
I have 2 scenarios that I am trying to achieve. One of which I have accomplished.
I just need to be shown what I am doing wrong and what I need to do to rectify it.
Scenario 1 – accomplished
I created a before business rule. Selected query and then completed the below:
This only allows users who are part of this customer success group the ability to see tasks that are assigned to that group. They cannot view any other task that’s assigned to another group.
Scenario 2 – failed
I want to set up a similar situation as scenario 2, but this group of people will be part of 2 assignment groups and need to see tasks assigned to only the 2 groups.
I have tried multiple attempts at this but each has failed including individual rules for each assignment group.
One of the obstacles is that one of the groups is a parent group and the other is a child of the parent. But both assignment groups have tasks assigned to them.
My latest attempt was:
The team does have a specific role, so would a role based business rule be better?
Does anyone have some experience in this that would be able to walk me through it?
Many thanks in advance
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 07:26 AM
Try as
current.addEncodedQuery('assignment_group=b85d44954a3623120004689b2d5dd60a^assignment_group=09745cc9c3302200e7c7d44d81d3ae6f')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 07:26 AM
Try as
current.addEncodedQuery('assignment_group=b85d44954a3623120004689b2d5dd60a^assignment_group=09745cc9c3302200e7c7d44d81d3ae6f')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2019 08:31 AM
Many thanks, this has now achieved the desired affect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 07:55 AM
I use the condition as: gs.getSession().isInteractive() && !gs.hasRole('admin') to make sure admins have all visibility in case of issues. Then as the rule for your second scenario you can use an if statement and query like this:
if(gs.getUser().isMemberOf('GROUP1','GROUP1')){
var qc = current.addQuery('assignment_group', 'IN', 'GROUP1,GROUP2') ;}