Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
cepe _
Portlet not for guest
November 29, 2012 4:31 AM
Answer

cepe _

Rank: New Member

Posts: 3

Join Date: November 29, 2012

Recent Posts

Hello guys!

I am currently developing portlet for liferay portal using Vaadin framework. I am wondering how I can set my portlet visible only for logged users.

When I am logged in as an administrator I can go to portlet's settings and just uncheck View option for Guest user. Is there any method to achieve that? Maybe some xml file with this configuration?

Br,
Pawel
Shankar Baba
RE: Portlet not for guest
November 29, 2012 5:09 AM
Answer

Shankar Baba

Rank: Regular Member

Posts: 144

Join Date: October 17, 2012

Recent Posts

Paweł Chwała:
Hello guys!

I am currently developing portlet for liferay portal using Vaadin framework. I am wondering how I can set my portlet visible only for logged users.

When I am logged in as an administrator I can go to portlet's settings and just uncheck View option for Guest user. Is there any method to achieve that? Maybe some xml file with this configuration?

Br,
Pawel



Actually you have to go to the configurations of that portlet and uncheck the permission for guest, it should work.

--Shivaji
cepe _
RE: Portlet not for guest
November 29, 2012 5:37 AM
Answer

cepe _

Rank: New Member

Posts: 3

Join Date: November 29, 2012

Recent Posts

Yea, I know. It works. But I would like to have it as default behavior after deploying process. I would like it to be predefined earlier.
David H Nebinger
RE: Portlet not for guest
November 29, 2012 6:17 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6536

Join Date: September 1, 2006

Recent Posts

Remove the guest security role from your portlet.xml file.
Apoorva Prakash
RE: Portlet not for guest
November 30, 2012 1:52 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Hello Cepe,

Remove the follwoing from portlet.xml

1<security-role-ref>
2        <role-name>guest</role-name>
3</security-role-ref>


Hope this will help.

Thanks and Regards,
Apoorva Prakash
cepe _
RE: Portlet not for guest
November 30, 2012 4:30 AM
Answer

cepe _

Rank: New Member

Posts: 3

Join Date: November 29, 2012

Recent Posts

Apoorva Prakash:
Hello Cepe,

Remove the follwoing from portlet.xml

1<security-role-ref>
2        <role-name>guest</role-name>
3</security-role-ref>


Hope this will help.

Thanks and Regards,
Apoorva Prakash



Hi, I haven't had this section in potlet.xml file. ;) So I am a little bit confused now ;)
Jan Geißler
RE: Portlet not for guest
November 30, 2012 4:42 AM
Answer

Jan Geißler

Rank: Expert

Posts: 356

Join Date: July 5, 2011

Recent Posts

Another Approach would be to set the VIEW permission in portlet-resources.

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Using+Liferay's+Permission+System+from+a+portlet
Apoorva Prakash
RE: Portlet not for guest
November 30, 2012 8:01 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

cepe _:
Apoorva Prakash:
Hello Cepe,

Remove the follwoing from portlet.xml

1<security-role-ref>
2        <role-name>guest</role-name>
3</security-role-ref>


Hope this will help.

Thanks and Regards,
Apoorva Prakash



Hi, I haven't had this section in potlet.xml file. ;) So I am a little bit confused now ;)


Can you please provide your XML ?
Hitoshi Ozawa
RE: Portlet not for guest
December 1, 2012 2:34 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

See the security section in online Development document on setting portlet's properties.

http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/security-and-permissio-4