Hi, Can we restrict the visibility of custom menu item links to few users?
If yes, how?
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.
Is the menu based on custom objects or any menu you created via links.
It is link to a portlet.
Portlet rights don't do it?
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.
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)
100% agree with Dave
Ok, thanks David!
Retrieving data ...