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,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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue