Author: juanpablo
Date: Fri May 13 07:20:09 2011
New Revision: 1102585
URL: http://svn.apache.org/viewvc?rev=1102585&view=rev
Log:
fixes JSPWIKI-691
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/LoginActionBean.java
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/LoginActionBean.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/LoginActionBean.java?rev=1102585&r1=1102584&r2=1102585&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/LoginActionBean.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/LoginActionBean.java
Fri May 13 07:20:09 2011
@@ -209,15 +209,13 @@ public class LoginActionBean extends Abs
@WikiRequestContext( "login" )
public Resolution view()
{
- ValidationErrors errors = getContext().getValidationErrors();
-
// If user got here and is already authenticated, it means
// they just aren't allowed access to what they asked for.
// Weepy tears and hankies all 'round.
if( getContext().getWikiSession().isAuthenticated() )
{
- errors.addGlobalError( new LocalizableError(
"login.error.noaccess" ) );
- return new RedirectResolution( MessageActionBean.class );
+ String accessDenied = new LocalizableError( "login.error.noaccess"
).getMessage( getContext().getRequest().getLocale() );
+ return new ForwardResolution( MessageActionBean.class
).addParameter( "message", accessDenied );
}
if(
getContext().getEngine().getAuthenticationManager().isContainerAuthenticated() )