mirror of https://github.com/apache/archiva.git
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:
parent
e5950ce1ad
commit
ad540803af
|
@ -140,7 +140,10 @@ public class ArchivaUserManagerAuthenticator
|
|||
if ( user.getCountFailedLoginAttempts() > 0 )
|
||||
{
|
||||
user.setCountFailedLoginAttempts( 0 );
|
||||
userManager.updateUser( user );
|
||||
if ( !userManager.isReadOnly() )
|
||||
{
|
||||
userManager.updateUser( user );
|
||||
}
|
||||
}
|
||||
|
||||
return new AuthenticationResult( true, source.getPrincipal(), null );
|
||||
|
@ -162,11 +165,16 @@ public class ArchivaUserManagerAuthenticator
|
|||
|
||||
try
|
||||
{
|
||||
|
||||
securityPolicy.extensionExcessiveLoginAttempts( user );
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
userManager.updateUser( user );
|
||||
if ( !userManager.isReadOnly() )
|
||||
{
|
||||
userManager.updateUser( user );
|
||||
}
|
||||
}
|
||||
|
||||
//return new AuthenticationResult( false, source.getPrincipal(), null, authnResultExceptionsMap );
|
||||
|
|
Loading…
Reference in New Issue