summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-web-common
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-12-13 09:15:46 +0000
committerOlivier Lamy <olamy@apache.org>2012-12-13 09:15:46 +0000
commitad540803afcd1107ed186eac0d0c85a1dd11774d (patch)
tree5303c2590535c0a8f76a17f721cd8f0ee5919fb0 /archiva-modules/archiva-web/archiva-web-common
parente5950ce1ad2741b90a673eb33e8450e2d12f55c9 (diff)
downloadarchiva-ad540803afcd1107ed186eac0d0c85a1dd11774d.tar.gz
archiva-ad540803afcd1107ed186eac0d0c85a1dd11774d.zip
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
Diffstat (limited to 'archiva-modules/archiva-web/archiva-web-common')
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
index b9c79564b..767d90e7b 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
@@ -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 );