Details

      Description

      When the user is not yet logged in and directly hits a page that is protected with login-required="true" auto-login does not kick in.
      The user is redirected to the login page in any case.

      This is due to the current implementation of Pages.isLoginRedirectRequired:

      private boolean isLoginRedirectRequired(String viewId, Page page)

      { return page.isLoginRequired() && !viewId.equals( getLoginViewId() ) && !Identity.instance().isLoggedIn(); }

      IMHO it should better tryLogin() first, like

      private boolean isLoginRedirectRequired(String viewId, Page page)
      {
      if (!page.isLoginRequired() || viewId.equals(getLoginViewId()))

      { return false; }

      Identity identity = Identity.instance();
      identity.tryLogin();
      return !identity.isLoggedIn();
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shane.bryzak Shane Bryzak
                Reporter:
                stephen.friedrich stephen.friedrich
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: