2 Replies Latest reply on Feb 26, 2008 9:59 PM by nickarls

    Redirect after login

    vinc

      Hi all,


      how can I redirect the user after login to different pages, depending on user's role? (user can have more than one role)


      Thanks in advance!

        • 1. Re: Redirect after login

          Search this forum for 'sendRedirect' and you will get at least one way of doing it.


          I guess you could do it with navigation rules in pages.xml, but I haven't tried that myself.

          • 2. Re: Redirect after login
            nickarls

            Never tried it myself my the manual has an example of


                <navigation from-action="#{documentEditor.update}" 
            
                               evaluate="#{documentEditor.errors.size}">
            
                    <rule if-outcome="0">
            
                        <redirect view-id="/viewDocument.xhtml"/>
            
                    </rule>
            
                </navigation>
            
                
            
            



            if you change from-action and evaluate to something with s:hasPermission you might be close.