Foren

Regarding webcontent

vasudha karri, geändert vor 11 Jahren.

Regarding webcontent

New Member Beiträge: 17 Beitrittsdatum: 03.05.12 Neueste Beiträge
Hi

1)I created a page and added web content display portlet two times to that page
2)Each webcontent display show different web content
3)i set permissions to the first webcontent display portlet using configuration so that it can be viewed by one role(eg:user_role_1) and to the other display another role (eg:user_role_2)and assigned those roles to two different users

My problem is when i login as user having one of the above role i can see the webcontent to which he has permissions to view but the same page is also showing the other webcontent display as "You do not have the roles required to access this portlet.". I dont want to display that. i just need to display only content for which he has view permission and other webcontent should be hidden

PFA for reference
thumbnail
Tejas Kanani, geändert vor 11 Jahren.

RE: Regarding webcontent

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Hi Vasudha,

Just add below properties in portal-ext.properties and restart the server. It will not show you that message("You do not have the roles required to access this portlet.").


#
# Set this to true if users are shown that they do not have access to a
# portlet. The portlet init parameter "show-portlet-access-denied" will
# override this setting.
#
layout.show.portlet.access.denied=true


Hope this is what you are looking for.

Thanks,
Tejas
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Regarding webcontent (Antwort)

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Set the property below in ROOT\WEB-INF\classes\portal-ext.properties file. You'll have to create the portal-ext.properties file yourself.

layout.show.portlet.access.denied=false

What I've done is create a hook to implement commonly use default settings and jsp modifications. This way, I'll be able to get my default settings by just deploying the hook. emoticon
vasudha karri, geändert vor 11 Jahren.

RE: Regarding webcontent

New Member Beiträge: 17 Beitrittsdatum: 03.05.12 Neueste Beiträge
thanks for the reply ..it worked fine