Forums de discussion

Hide Portlet from user without permissions

uri lucio, modifié il y a 12 années.

Hide Portlet from user without permissions

New Member Publications: 5 Date d'inscription: 13/06/11 Publications récentes
Hi,
I am a newbay to liferay development ,
I am using the latest liferay IDE with eclipse Helios .
I have created a portlet Porject and I want this portlet to be hidden from some groups ( Users nad etc) how exactly should I approach it when using the plugin ,
can someone please redirect me to a good article that might answering the question.

Thanks ahead
thumbnail
Chris Jurado, modifié il y a 12 années.

RE: Hide Portlet from user without permissions

Junior Member Publications: 66 Date d'inscription: 16/07/10 Publications récentes
User permissions are configured once the portlet is installed onto a page. You don't have to specifically code for that in your portlet project.
thumbnail
Ronak Patel, modifié il y a 12 années.

RE: Hide Portlet from user without permissions

New Member Publications: 19 Date d'inscription: 20/01/10 Publications récentes
Hi Uri,
Unckeck the view permission for the User Role from the Configuration window of the portlet in the browser.
Moreover, set layout.show.portlet.access.denied=false Into portal-ext.properties file.
This will not show the portlet for users not having view permission on the page.

Thanks,
Ronak
thumbnail
jelmer kuperus, modifié il y a 12 années.

RE: Hide Portlet from user without permissions

Liferay Legend Publications: 1191 Date d'inscription: 10/03/10 Publications récentes
It depends on what you mean

if you dont want users to see a portlet that is already on a page then what Ronak Patel is saying is correct

However if you want certain users not to be able to add a specific portlet to his or her pages, you will have to go to control panel > plugins configuration, find your portlet and assign the add to page permission only to users in a specific role. So you remove that permission from the user and power user role