Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Change: Restricting Module Visibility based on user's department

andy_dufresne
Tera Expert

Is there anyway I can restrict a specific module to user's department?

When I edit the module, the visibility is based only on roles.

Any other alternatives to achieve this?

Thanks,

find_real_file.png

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Possible.



Easiest way would be to do this via roles. Add a custom role to the users who needs to have access and use it to control access.


Hardest way would be to write a query business rule on modules table. This isn't so hard either.


View solution in original post

6 REPLIES 6

Kalaiarasan Pus
Giga Sage

Possible.



Easiest way would be to do this via roles. Add a custom role to the users who needs to have access and use it to control access.


Hardest way would be to write a query business rule on modules table. This isn't so hard either.


Gaurav Bajaj
Mega Sage

Hi Andy,



You can try it with a before query BR on module table where you can check for module sysId




Can you restrict showing a module link by group instead of role?



Can you restrict showing a module/application menu by group instead of role


Thank you Kalai and Gaurav!



Creating roles is a good idea.   Instead of giving this access to *every* user who belongs to a specific department, is there anyway I can add this role to an user from that department.




Basically, I'm wondering if vice-versa is possible [add this role to that department].   This way I dont have to separately add this role to every user just their association with department should be good enough.



possible?


I even checked the 'department' table to see if I can establish a relationship:



find_real_file.png