Fórum

How to hide a webcontent portlet - Please help.

Sam w, modificado 13 Anos atrás.

How to hide a webcontent portlet - Please help.

Liferay Master Postagens: 660 Data de Entrada: 03/03/09 Postagens Recentes
Hi,

With Liferay EE SP4, I am trying to hide a webcontent portlet base on Roles.
If the login user Role is Community member, I want to hide a webcontent portlet.
However when I created a user and assigned it to a community member, and set permission on the webcontent to Owner and Guest, uncheck the checkbox on community member -> then submit, relogin as this user, go back to the page where the webcontent portlet belong, the user still can see the webcontent porltet.

What is the proper way to hide a webcontent portlet in Liferay EE SP4?

Your helps is very much appreciated.

Thanks
Sam.
thumbnail
Jonas X. Yuan, modificado 13 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Liferay Master Postagens: 993 Data de Entrada: 27/04/07 Postagens Recentes
Hi Sam,

Do you want to hide the web content portlet in Control Panel?

If yes, you can get it by resetting the roles and permissions.

Hope that it helps,

Thanks

Jonas Yuan

-----------------
The Author of Liferay Books:
Liferay User Interface Development
Liferay Portal 6 Enterprise Intranets
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Sam w, modificado 13 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Liferay Master Postagens: 660 Data de Entrada: 03/03/09 Postagens Recentes
Hi Jonas,

Appreciate for your reply.
I have had a look at the Permission by going through control panel-> Web Content->click on the Action button for the webcontent -> select Permission. In the Permission page of this web content, I remove the view for community member role and allow Guest and Owner view for this web content. But when I login as a community member (role) I still able to see the web content portlet on the page. If I remove the view for Guest role, login a user without any role defined, the user still can't see the web content portlet.

I have reviewed the Roles setup for this user, it does not contain any Role there - Not a User role nor a Power User role.

I am wondering if Liferay has implicitly assigned a Default role (Guest) to this user.
And why a user wtihout any role still can see a web content portlet that has configured to be only seen by Guest and Owner?

Thanks
Sam
thumbnail
Ray Augé, modificado 13 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Liferay Legend Postagens: 1197 Data de Entrada: 08/02/05 Postagens Recentes
By default we don't enable web content view permission checking to offer a slight savings on performance.

To enable it set this property to true:

    #
    # Set this to true to check that a user has the VIEW permission on a
    # Journal article when its content is rendered.
    #
    journal.article.view.permission.check.enabled=false


in portal-ext.properties
Sam w, modificado 13 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Liferay Master Postagens: 660 Data de Entrada: 03/03/09 Postagens Recentes
Hello Ray,

Thank you for the suggestion.
I have added the line in portal-ext.properties file.
Restarted liferay (shutdown & start.sh), and login as a particular user without the owner and Guest Roles, but the web content still shown on the web page.

Here is the line I have added in portal-ext.properties file:


journal.article.view.permission.check.enabled=true


The permission of the web content has only Guest and Owner in-placed.
You can refer to the attachment that come with this post for more information.

Very appreciate for the help again.

Thanks
Sam
thumbnail
Hugh Martin, modificado 13 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Junior Member Postagens: 75 Data de Entrada: 15/06/10 Postagens Recentes
I am having the exact same problem with Liferay 6 EE Trial. I've also added journal.article.view.permission.check.enabled=true to my portal-ext.properties, but the web content portlet still appears. Any recommendations out there?
thumbnail
Ed Holderman, modificado 13 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Junior Member Postagens: 25 Data de Entrada: 15/07/10 Postagens Recentes
I've not seen a solution to this anywhere. In Liferay 5.2.3 I want to create a piece of web content for Guest with a link to sign in through CAS. After the person logs in and becomes a "User", I don't want the portlet to display anymore (not just the content, the whole portlet). I used a Web Content portlet to show the content from the CMS on a public page. On the portlet I assigned View permissions to Guest and our Administrator role and removed all permissions for "User". The portlet displays appropriately for unauthenticated users but still shows for authenticated users having no roles assigned. This is wrong, User should not inherit the permissions of Guest. Why is it happening?

Thanks,
Ed
thumbnail
Davide Rossi, modificado 12 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Junior Member Postagens: 55 Data de Entrada: 03/07/10 Postagens Recentes
Ed Holderman:
I've not seen a solution to this anywhere. In Liferay 5.2.3 I want to create a piece of web content for Guest with a link to sign in through CAS. After the person logs in and becomes a "User", I don't want the portlet to display anymore (not just the content, the whole portlet). I used a Web Content portlet to show the content from the CMS on a public page. On the portlet I assigned View permissions to Guest and our Administrator role and removed all permissions for "User". The portlet displays appropriately for unauthenticated users but still shows for authenticated users having no roles assigned. This is wrong, User should not inherit the permissions of Guest. Why is it happening?

Thanks,
Ed


Wow this is a pretty old post, but it seems nobody has had an answer to this question... 6.1.0 GA1 and today's github version still reflect this issue.
Can someone help???

Thanks...
thumbnail
Johann Kneringer, modificado 11 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Junior Member Postagens: 42 Data de Entrada: 10/11/11 Postagens Recentes
i need help on this issue too...

I want to make a web content display only available to guests, not to site member within a site...
Melvin Rodriguez Rojas, modificado 12 Anos atrás.

RE: How to hide a webcontent portlet - Please help.

Junior Member Postagens: 50 Data de Entrada: 04/02/11 Postagens Recentes
There are a way to hide a portlet based in java code...???
for example when I do click on a button set visible the portlet that was hidden.
Thanks