0 Replies Latest reply on Nov 15, 2010 4:10 PM by Waldo Nell

    Role based redirection on login fails

    Waldo Nell Newbie

      I have reviewed several older posts, but do not see a solution.  Why does the login alternate between the two landing pages for a user that has ModifyAccount role, when he logs in / out / back in / out  / etc?  For a user that does not have ModifyAccount role they always correctly get redirected to the main.xhtml page, no matter how many times I log in / out.

        <page view-id="/login.xhtml" conversation-required="false" login-required="false">
          <navigation from-action="#{identity.login}">
            <rule if="#{identity.loggedIn and s:hasRole('ModifyAccount')}">
              <redirect view-id="/myaccountmain.xhtml"/>
            <rule if="#{identity.loggedIn and !s:hasRole('ModifyAccount')}">
              <redirect view-id="/main.xhtml"/>

      If a person with ModifyAccount role logs in, he gets redirected to myaccountmain.xhtml (correct).  He then logs out, and logs back in.  He will then get placed on main.xhtml.  The redirection alternates between the two pages.  I am using Seam 2.2.0GA under JBoss 5.1.0.