no need to try updating the user if userManagerImpl is read only

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1421158 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-12-13 09:15:46 +00:00
parent e5950ce1ad
commit ad540803af
1 changed files with 10 additions and 2 deletions

View File

@ -140,8 +140,11 @@ public class ArchivaUserManagerAuthenticator
if ( user.getCountFailedLoginAttempts() > 0 )
{
user.setCountFailedLoginAttempts( 0 );
if ( !userManager.isReadOnly() )
{
userManager.updateUser( user );
}
}
return new AuthenticationResult( true, source.getPrincipal(), null );
}
@ -162,12 +165,17 @@ public class ArchivaUserManagerAuthenticator
try
{
securityPolicy.extensionExcessiveLoginAttempts( user );
}
finally
{
if ( !userManager.isReadOnly() )
{
userManager.updateUser( user );
}
}
//return new AuthenticationResult( false, source.getPrincipal(), null, authnResultExceptionsMap );
}