Clarity

  • 1.  Restrict Menu Links Visibility

    Posted Nov 21, 2016 04:54 AM

    Hi, Can we restrict the visibility of custom menu item links to few users?

     

    If yes, how?

     

    Regards,

    Uruj

    Uruj



  • 2.  Re: Restrict Menu Links Visibility

    Broadcom Employee
    Posted Nov 21, 2016 05:19 AM

    Hi Uruj,

     

    Is the menu based on custom objects or any menu you created via links.

     

    Regards

    Suman Pramanik 



  • 3.  Re: Restrict Menu Links Visibility

    Posted Nov 21, 2016 07:12 AM

    Hi Suman,

     

    It is link to a portlet.

     

    Regards,

    Uruj



  • 4.  Re: Restrict Menu Links Visibility

    Posted Nov 21, 2016 08:19 AM

    Portlet rights don't do it?



  • 5.  Re: Restrict Menu Links Visibility

    Posted Nov 21, 2016 08:30 AM

    Would be portlet-page / tab-page access rights.

     

    If you do not have the portlet-page VIEW access right (at the page or tab level) then you would not even see the link in the menu. For custom objects its an object based right - but yes we can control menu structure just with access rights.



  • 6.  Re: Restrict Menu Links Visibility

    Posted Nov 24, 2016 04:45 AM

    Thanks, I checked this. However, in my environment, its not possible to implement this via access rights. Can someone help me with few line of code to be written in the existing portlet query that limits the visibility of portlet to a few users only (i think using security tag)



  • 7.  Re: Restrict Menu Links Visibility
    Best Answer

    Posted Nov 24, 2016 05:27 AM

    Umm - "its not possible to implement this via access rights" - of course it is, it is YOUR CHOICE whether to give users "view all portlets" access right and if your environment has done this then I would suggest that that was the wrong thing to do (ever!).

     

    You cannot limit the visibility of a portlet by "code", the application is deciding whether to display the portlet/page or not (based upon access rights) before any portlet code has run. You can identify the executing user using NSQL constructs ( @WHERE:PARAM:USER_ID@ / @WHERE:PARAM:USER_NAME@ ) so your code could choose to not return any results if the user was not in a specified list or security group, but this is really a poor way of controlling access I think.



  • 8.  Re: Restrict Menu Links Visibility

    Posted Nov 24, 2016 05:34 AM

    100% agree with Dave

     

    Regards

    NJ



  • 9.  Re: Restrict Menu Links Visibility

    Posted Nov 30, 2016 04:30 AM

    Ok, thanks David!

     

    Regards,

    Uruj