2
votes

While permissioning the pages created in Guest site, I disable the view permission for Guest role and then log out.

Now when I try to login, I can see error message displaying permission error.

I know one of the possible way to resolve it would be firing some database query and enabling view permission for Guest role so that I can atleast log in.

However Is there any other way to resolve this ?

Also It would be nice If anyone provides the database query for this.

Thanks in advance.

1

1 Answers

1
votes

One approach I found is to use Auto login functionality of liferay.

Following are the steps:

1) Add following property in portal-ext.properties

auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin,com.liferay.portal.security.auth.FacebookAutoLogin,com.liferay.portal.security.auth.NtlmAutoLogin,com.liferay.portal.security.auth.OpenIdAutoLogin,com.liferay.portal.security.auth.OpenSSOAutoLogin,com.liferay.portal.security.auth.RememberMeAutoLogin,com.liferay.portal.security.auth.SiteMinderAutoLogin,com.liferay.portal.security.auth.ParameterAutoLogin

2) Now start the server and go to

LIFERAY_IP:LIFERAY_PORT?parameterAutoLoginLogin=ADMIN_USERNAME&parameterAutoLoginPassword=ADMIN_PASSWORD

i.e in my case

localhost:[email protected]&parameterAutoLoginPassword=test

3)You will now be able to log in to portal and then go to control panel with /group/control_panel and modify the permission of page.