Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Liferay 7.4 Restrict Access to a Page without Sign in
I have created a page named dashboard in the Liferay portal, but this page is public and accessible to all without Signin using following URL.
http://localhost:8080/dashboard
How I can restrict users from viewing this page without Signin. The requirement is if user hits the URL "http://localhost:8080/dashboard" without login it should route to the Home page (http://localhost:8080/home or http://localhost:8080), there user can do the Signin, after successfull Signin user should be navigated to the Dashboard page (http://localhost:8080/dashboard).
I have tried setting the page permissions, but its showing "404 page not found" if user hits "http://localhost:8080/dashboard" without Signin, in my case it should redirect to home page.
Below are the questions I would like to get help from the community.
1) How we can restrict a page can be viewable for Signed-in users?
2) How we can redirect to the home page if user accessing a resgtricted page instead of showing 404 page not found?
3) How we can redirect to a specific page (example http://localhost:8080/dashboard) after successfull Signin?
I am using Liferay version 7.4.3.74.
Just remove guest view permission from the page.
1) What Dave said
2) You will have to enable the "Login Prompt", which is disabled by default. This can either be done in the System, Instance or Site Settings und "Security - Login"
3) This should work automatically
Powered by Liferay™