Hide a module in the navigation pane

Srinidhi Hari E
Kilo Contributor

Hello,

I want to hide a module 'Custom Assets'   when the current logged in user is not a manager. Is there any way of scripting this?

I tried writing a Before query business rule on the modules table to list all modules except Custom Assets but it hides only in the modules list and not in the navigation pane.

Following a community post, created a dummy module and tried hiding Custom Assets using HTML from arguments, that didn't work either.

Any help?

Thanks!

6 REPLIES 6

Chuck Tomasi
Tera Patron

Modules are controlled by roles. The way to do this is to assign a role to the managers and apply that role to the module.



Administering Application Menus and Modules - ServiceNow Wiki


Hey Chuck,


Is there any way of scripting this or is giving a role the only way to go ?


Roles is what grant access to a module/application in the menu so you have to do it by roles.


Why would you want to script it?



You can always make a script that gives managers role xyz if they are listed as manager, and same script can remove the role if they aren't manager anymore.


Inactive_Us1474
Giga Guru

Hi,



You can edit the module and mention what roles is required in order to access the module.



Thanks and Hope it helps.