summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-security
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-modules/archiva-web/archiva-security')
-rw-r--r--archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java5
-rw-r--r--archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java7
2 files changed, 11 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java
index 74e4567bc..0cbc02fd2 100644
--- a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java
+++ b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/ArchivaServletAuthenticator.java
@@ -30,6 +30,7 @@ import org.apache.archiva.redback.system.DefaultSecuritySession;
import org.apache.archiva.redback.system.SecuritySession;
import org.apache.archiva.redback.system.SecuritySystem;
import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManagerException;
import org.apache.archiva.redback.users.UserNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -115,7 +116,11 @@ public class ArchivaServletAuthenticator
catch ( AuthorizationException e )
{
throw new UnauthorizedException( e.getMessage(), e );
+ } catch ( UserManagerException e )
+ {
+ throw new UnauthorizedException( e.getMessage(), e );
}
+
}
diff --git a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java
index 91ba7a3e0..58aad4b96 100644
--- a/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java
+++ b/archiva-modules/archiva-web/archiva-security/src/main/java/org/apache/archiva/security/DefaultUserRepositories.java
@@ -30,6 +30,7 @@ import org.apache.archiva.redback.system.DefaultSecuritySession;
import org.apache.archiva.redback.system.SecuritySession;
import org.apache.archiva.redback.system.SecuritySystem;
import org.apache.archiva.redback.users.User;
+import org.apache.archiva.redback.users.UserManagerException;
import org.apache.archiva.redback.users.UserNotFoundException;
import org.apache.archiva.security.common.ArchivaRoleConstants;
import org.slf4j.Logger;
@@ -43,7 +44,7 @@ import java.util.List;
/**
* DefaultUserRepositories
*/
-@Service ( "userRepositories" )
+@Service( "userRepositories" )
public class DefaultUserRepositories
implements UserRepositories
{
@@ -151,6 +152,10 @@ public class DefaultUserRepositories
{
throw new PrincipalNotFoundException( "Unable to find principal " + principal + "", e );
}
+ catch ( UserManagerException e )
+ {
+ throw new ArchivaSecurityException( e.getMessage(), e );
+ }
if ( user.isLocked() )
{