restrict view of navigation menu

loraine
Kilo Contributor

I would like to restrict the view of a Navigation menu item by role.   I am on Geneva with UI16.

I would like any user with a role not to see a menu item and any user without a role to have the item visible.

I have looked at Unfortunately, you can only   , adding an ACL for sys_app_module.* although I can not get it to work.

The script is:

var myUser = gs.getUser();

var has_group = true;

var grp = new GlideRecord('sys_user_grmember');

grp.addQuery('user', myUser);

grp.query();

if (grp.next()) {

  has_group = false;

}

if (myUser.hasRoles() || has_group == true) {

  current.addQuery('sys_id','!=','111111122222222xxxxxxx');   //my menu item here to hide

}

6 REPLIES 6

david_legrand
Kilo Sage

Hi Loraine,



The navigation menu isn't using ACL but roles directly on the applications/modules.


Create a module should help unless if I misunderstood the question


Hi David,


I think you have miss understood the question.


I would like a requestor user to see a menu item and a fulfiller user to have the same menu item invisible.   This cannot be done within the standard role field in Create a module.



eg. 'Homepage' item listed below can be seen by all requestor users except for users that have the 'itil' role.


Users with the 'itil' role can not see the 'Homepage' menu item.


find_real_file.png


In that case, I unfortunately understood well the question, the only way to show/hide modules is using the role field.



find_real_file.png


So the only way to implement this requirement is to create a role you'll give to all requester but not to fulfiller. And before doing it, I would suggest you to contact your sales representative to be sure you won't do something against the licence model.



I'll ask around if I can bring you a more precise answer on "is it compliant from a licence point of view?" but on the "technical point of view, this is the only way". This this reason we usually say "if a requester can see the module A, a fulfiller can see the same module A".


Thanks, we thought of that too, unfortunately any user that has a role incurs a licence fee.  


This is why we were trying to get around it with ACLs.


I guess this is not possible then.