Reputation: 692
I'm trying to figure out how to implement a mechanism that decides dynamically what's the landing page for a user.
I know that the default landing page is relatively easy to customize, as you can see in the following link:
http://blogs.alfresco.com/wp/ddraper/2011/11/01/advanced-share-customization-part-1/
http://zscribble.wordpress.com/2012/02/13/how-to-change-user-landing-page-in-alfresco-share/
But it is not enough because I need go a little further; after the successful authentication of any user, I need to retrieve the site/s that a user belongs to and then redirect to the dashboard of any of the sites.
I guess there is any authentication service that redirects to TOMCAT/webapps/share/site-index.jsp
, and from here to either the user dashboard or a site dashboard, depending on the parameters received. If I'm right with my assumption, I understand I just should customize such supposed authentication service in order to get the user's sites and then redirect to the appropriate site dashboard's URL.
Am I in the right way? If not, any idea on how to proceed?
Thanks.
Upvotes: 2
Views: 1830
Reputation: 692
There are two possible approach in order to implement a mechanism which dynamically redirects to a page after a successful authentication in Alfresco Share.
The easiest way consists in the next steps:
<root-page>
in the file alfresco\site-data\configurations\slingshot.site.configuration.xml
(the default value is site-index
).accept-invite component
is doingThe other possible way is to override the classes PageView
and PageViewResolver
, this way you can perform the redirection to the landing page in a single step rather than two steps, what is more efficient as a consequence. I didn't developed this solution so I cannot give more details but according to what an Alfresco Engineer says, it is viable to achieve.
If you want to know more about this, read this thread.
Upvotes: 1