How to restrict assignment groups based on role?

Radhika11
Tera Contributor

Hello,

I need help on restricting users belonging to Legal Group from seeing other assignment group from the dropdown.

For Example, Zackary Mockus is a member of Legal Group and Legal Group has sn_incident_write role. Any members who are in the Legal Group will not able to see other groups except the Legal Group.  Thanks

find_real_file.png

 

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hi,

If this is just for the incident table, then you can create an advanced reference qualifier to limit that.

  • Right-click assignment group label name on incident form and choose Configure > Dictionary
  • Scroll down to Dictionary Overrides related list and look for an entry for "incident" table
  • If one exists, open it and override the reference qualifier with the script below
  • If one doesn't exist, create it and use the reference qualifier script below

If you're wanting this in effect for the platform, so if legal members are using other tables (change, catalog items with reference to groups, etc.). then you can use a query business rule to help limit this.

Since you mentioned just incident and it's around the sn_incident_write role, then you can use an advanced reference qualifier such as:

javascript:var r = ''; if (gs.getUser().isMemberOf('Legal Group')) { r = "name=Legal Group"; } r;

If this needs to be applied in a bigger way, then you'd want to use a script include and do all of your script there, then instantiate that script include in your advanced reference qualifier.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hi,

If this is just for the incident table, then you can create an advanced reference qualifier to limit that.

  • Right-click assignment group label name on incident form and choose Configure > Dictionary
  • Scroll down to Dictionary Overrides related list and look for an entry for "incident" table
  • If one exists, open it and override the reference qualifier with the script below
  • If one doesn't exist, create it and use the reference qualifier script below

If you're wanting this in effect for the platform, so if legal members are using other tables (change, catalog items with reference to groups, etc.). then you can use a query business rule to help limit this.

Since you mentioned just incident and it's around the sn_incident_write role, then you can use an advanced reference qualifier such as:

javascript:var r = ''; if (gs.getUser().isMemberOf('Legal Group')) { r = "name=Legal Group"; } r;

If this needs to be applied in a bigger way, then you'd want to use a script include and do all of your script there, then instantiate that script include in your advanced reference qualifier.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Allen

This is exactly what I was trying to do.  It is working great.  If I would like this user to also see the Database and Help Desk groups.  How to modify the code to make it works.

Thank you so much Allen!

Hi,

You would simply add more groups to this section of what I proposed above, like:

"name=Legal Group^ORname=Group 2^ORname=Group 3"

Please mark reply as Helpful, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

It works perfectly!  Thank you again!