diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaAuthorizer.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaAuthorizer.java index cd599fa51..9b0535572 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaAuthorizer.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaAuthorizer.java @@ -84,7 +84,7 @@ public class ArchivaAuthorizer authorizationException = e; } - if ( result.isAuthorized() ) + if ( result != null && result.isAuthorized() ) { return result; } diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java index a87a4c433..853b14d15 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java @@ -449,7 +449,7 @@ public class ArchivaConfigurableUsersManager throws UserManagerException { UserManager userManager = findFirstWritable(); - if ( userManager.isReadOnly() ) + if ( userManager == null ) { log.warn( "cannot find writable user manager implementation, skip guest user creation" ); return null;