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

    Redirect after login

    Vinc Wega Newbie

      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
          Daniel Roth Apprentice

          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
            Nicklas Karlsson Master

            Never tried it myself my the manual has an example of

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

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