Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
venka reddy
hiding portlet
July 14, 2013 12:49 PM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

How to hide a portlet for users other than admin.

I have tried following snippets , but does not work
1
2  Portlet portlet = (Portlet)renderRequest.getAttribute(WebKeys.RENDER_PORTLET);
3   portlet.setShowPortletAccessDenied(true);


Is anything wrong over there !!!
David H Nebinger
RE: hiding portlet
July 14, 2013 8:45 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11788

Join Date: September 1, 2006

Recent Posts

Just remove all view access to all but owner.