]
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: