[jbossseam-issues] [JBoss JIRA] Assigned: (JBSEAM-4085) Quite login not working

Shane Bryzak (JIRA) jira-events at lists.jboss.org
Thu Apr 9 00:52:22 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBSEAM-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shane Bryzak reassigned JBSEAM-4085:
------------------------------------

    Assignee: Shane Bryzak


> Quite login not working
> -----------------------
>
>                 Key: JBSEAM-4085
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4085
>             Project: Seam
>          Issue Type: Bug
>          Components: Security
>    Affects Versions: 2.1.1.GA
>            Reporter: Stephen Friedrich
>            Assignee: Shane Bryzak
>
> 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();
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list