Restrict all access to incidents based on certain categories to only itil users that belong to a certain group, otherwise itil users can access all other incidents.

Marc Paquette
Mega Expert

Hello,

The IT department (Tier 1) are assigned HR related incidents (as an example, employee exit) that are category "Exit". I want to to restrict who can see those incidents (Category Exit, in this example but i have several categories i need to do this on) to only Tier 1. From my reading it looks like the way to go would be to use a business rule or to use ACL. Being brand new to all of this I dont want to break everything else and iam not sure how to go about it.

 

Any help or advice would be greatly appreciated.

 

Thanks,

Marc

1 ACCEPTED SOLUTION

Ajaykumar1
Tera Guru

Hi Marc,

You can refer OOTB 'incident query' business rule.

Set 'incident query' BR inactive and create another BR and modify it according to our requirement.

 

Mark If Correct/Helpful

Regards,
Ajay

View solution in original post

6 REPLIES 6

Ajaykumar1
Tera Guru

Hi Marc,

You can refer OOTB 'incident query' business rule.

Set 'incident query' BR inactive and create another BR and modify it according to our requirement.

 

Mark If Correct/Helpful

Regards,
Ajay

Marc Paquette
Mega Expert

Hi Ajay,

Thanks for pointing me in the correct direction.

This is what i see in the OOTB BR.

if (!gs.hasRole("itil") && 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);
}

I can probably figure out how to code what i need to do however I also don't want to mess up.

The OOTB BR gives non Itil users access to their own incidents as well as incidents they are on the watch list for. So my guess here would be to add an else if statement something like

else if(gs.hasRole("itil") && !gs.getUser().isMemberOf('sys_id_of Tier1')){

var u = gs.getUserID();

var qc = current.addQuery("category", "DOES NOT CONTAIN","EXIT");
gs.print("query restricted for user: " + u);
}

Am i close or out to lunch? 

 

Regards,

Marc

Yes Marc....go ahead.

Marc Paquette
Mega Expert

Hi Ajay,

 

Well it seems to work pretty well though it needs tweaking a bit. Thanks for your help and wisdom.

 

Regards,

Marc