Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Sam E
How to hide a webcontent portlet - Please help.
25 settembre 2010 6.50
Risposta

Sam E

Punteggio: Liferay Master

Messaggi: 660

Data di Iscrizione: 2 marzo 2009

Messaggi recenti

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.
Jonas Yuan
RE: How to hide a webcontent portlet - Please help.
8 ottobre 2010 17.12
Risposta

Jonas Yuan

Punteggio: Liferay Master

Messaggi: 993

Data di Iscrizione: 26 aprile 2007

Messaggi recenti

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 E
RE: How to hide a webcontent portlet - Please help.
25 settembre 2010 20.50
Risposta

Sam E

Punteggio: Liferay Master

Messaggi: 660

Data di Iscrizione: 2 marzo 2009

Messaggi recenti

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
Ray Augé
RE: How to hide a webcontent portlet - Please help.
2 ottobre 2010 10.24
Risposta

Ray Augé

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1171

Data di Iscrizione: 7 febbraio 2005

Messaggi recenti

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:

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


in portal-ext.properties
Sam E
RE: How to hide a webcontent portlet - Please help.
9 ottobre 2010 6.21
Risposta

Sam E

Punteggio: Liferay Master

Messaggi: 660

Data di Iscrizione: 2 marzo 2009

Messaggi recenti

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:

1
2journal.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
Allegati: images.doc (105,5k)
Hugh Martin
RE: How to hide a webcontent portlet - Please help.
9 ottobre 2010 21.40
Risposta

Hugh Martin

Punteggio: Junior Member

Messaggi: 75

Data di Iscrizione: 15 giugno 2010

Messaggi recenti

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?
Ed Holderman
RE: How to hide a webcontent portlet - Please help.
27 gennaio 2011 10.14
Risposta

Ed Holderman

Punteggio: Junior Member

Messaggi: 25

Data di Iscrizione: 15 luglio 2010

Messaggi recenti

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
Melvin Rodriguez Rojas
RE: How to hide a webcontent portlet - Please help.
4 aprile 2011 8.35
Risposta

Melvin Rodriguez Rojas

Punteggio: Junior Member

Messaggi: 50

Data di Iscrizione: 4 febbraio 2011

Messaggi recenti

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
Davide N. P. Rossi
RE: How to hide a webcontent portlet - Please help.
15 febbraio 2012 7.25
Risposta

Davide N. P. Rossi

Punteggio: Junior Member

Messaggi: 55

Data di Iscrizione: 3 luglio 2010

Messaggi recenti

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...
Johann Kneringer
RE: How to hide a webcontent portlet - Please help.
19 dicembre 2012 0.54
Risposta

Johann Kneringer

Punteggio: Junior Member

Messaggi: 40

Data di Iscrizione: 10 novembre 2011

Messaggi recenti

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...