掲示板

How to get rid of public (user) pages entirely?

11年前 に Nav Dhillon によって更新されました。

How to get rid of public (user) pages entirely?

New Member 投稿: 24 参加年月日: 11/11/01 最新の投稿
I have used post-login-action that redirects (at signin) users to their private page. My challenge is to redirect the user to their private page (www.myportal.com/user/<userid>) even if they type just the base url (www.myportal.com) if they are already signed in.

My portal only has content on the user's private pages, so going to a public page shows a blank page. Therefore, we want to ensure that user ends up on the private page even if they deliberately typed in www.myportal.com. IF the user is not signed in, then the public page shows the login portlet correctly. So, the issue is only when user has active session in progress.

Appreciate any info on this. Thanks
thumbnail
11年前 に Subhasis Roy によって更新されました。

RE: How to get rid of public (user) pages entirely?

Expert 投稿: 275 参加年月日: 12/01/20 最新の投稿
That is because when user is login already then the post login hook does not get fired.

You can not do not using post login hook I guess.

You can try this by writting a filter and register that filter in your portlet. Your filter class will check if the user has already logged in or not and if the user has home page, then it will redirect the user to a different page(your private page).
thumbnail
11年前 に Prakash Khanchandani によって更新されました。

RE: How to get rid of public (user) pages entirely?

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
These properties when set to false in portal-ext.properties will disable all the public page access for all users:

layout.user.public.layouts.enabled=false
layout.user.public.layouts.auto.create=false


And as for redirecting you can use login post action as suggested or urlrewrite etc
thumbnail
11年前 に Pinkesh Gandhi によって更新されました。

RE: How to get rid of public (user) pages entirely?

Junior Member 投稿: 99 参加年月日: 12/01/27 最新の投稿
Hi All,

I agree with Subhasis.

As the LoginPostAction will be not be fired for already logged in users, we can go for that solution.
So filter development can be a one of the probable solutions.

And there is no meaning to disable the user's public layouts because disabling the user's public layouts will not resolve Nav's issue.
11年前 に Nav Dhillon によって更新されました。

RE: How to get rid of public (user) pages entirely?

New Member 投稿: 24 参加年月日: 11/11/01 最新の投稿
Thank you all for your responses. I knew the login postaction only fires at login, but I hadn't realized that there is a filter hook that I can write.

From what I can tell, version 6.0.6 CE does not support filter hooks, so I ll need to do an ext. And, what this ext will need to do is look at each servlet request's URL and redirect all public page requests (if user is signed in) to private page requests.

Does this seem reasonable way to approach this? Any pointers/suggestions/reference on what the ext should override/extend are appreciated. Thanks