Fórum

How can we prevent Liferay logging in users as Guest

Renjith Kurian, modificado 8 Anos atrás.

How can we prevent Liferay logging in users as Guest

New Member Postagens: 2 Data de Entrada: 24/02/15 Postagens Recentes
Hi,

We are facing some issues with Lifeary's behaviour of logging in users with the default Guest user login.

In our Liferay setup, there are three usergroups and roles. Our Liferay is configured with CAS and LDAP to provide SSO feature. We deployed our Portlet application and added it into a users welcome/home page. When we try to access the Portlet, we are automatically logged in as Liferay's internal Guest user. The portlet is visible to Guest user. He will be able to run the portlet application.

Only when we click on ‘sign in’ link on the , only then we are redirected to CAS and authenticated.

We need to prevent Liferay from login as Guest user. How can we do this ? Also, how do we make our portal accessible to only one user group ?
Only users belonging to this user group (the one which we have created for accessing the Portlet) should be able to run our portlet.


Regards
Renjith
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: How can we prevent Liferay logging in users as Guest

Liferay Legend Postagens: 14917 Data de Entrada: 02/09/06 Postagens Recentes
You're asking the wrong question...

First you cannot remove the guest user. Guest is a synonym for an unauthenticated user. Anyone anywhere hitting your site but not logging in is a guest.

The question you should be asking is how to prevent guests from viewing/using your portlet. That is really easy. From the gear menu of your portlet, choose the Configuration option and in the permissions table, uncheck all of the checkboxes in the guest row, then save the changes.

This will prevent guests from using your portlet and (if the permissions are set so the users can view, either directly by granting access to the User role or indirectly by having a role from the list as a member of the groups), authenticated users will be able to use your portlet.
thumbnail
Vishal Kumar, modificado 8 Anos atrás.

RE: How can we prevent Liferay logging in users as Guest

Regular Member Postagens: 198 Data de Entrada: 12/12/12 Postagens Recentes
Hi I am not sure whether it will work or not but just give a try

may be possible to disable guest users by deleting all lines with the following from liferay-portlet.xml.

<role-mapper>
<role-name>guest</role-name>
<role-link>Guest</role-link>
</role-mapper>

Regards,
Vishal
thumbnail
Olaf Kock, modificado 8 Anos atrás.

RE: How can we prevent Liferay logging in users as Guest

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Vishal Kumar:
Hi I am not sure whether it will work or not but just give a try

may be possible to disable guest users by deleting all lines with the following from liferay-portlet.xml.


Nope, won't work. Rather follow David's advice - it will solve the underlying problem instead of attempting to implement the solution that the OP asked for. You can't disable the guest role: Before login everybody is guest. But you can make sure that guest can't see certain data, applications and portlets.