diff options
author | Olivier Lamy <olamy@apache.org> | 2013-01-09 00:05:50 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-01-09 00:05:50 +0000 |
commit | 7fcb02920d56959f4eb06ca715aa9615e5136bd1 (patch) | |
tree | aaa6f9d40c9ce3f9b474c7d596f21dc4b62c61a5 /archiva-modules | |
parent | 7b7135cff787a0db33c0c6079911ebe75504aa89 (diff) | |
download | archiva-7fcb02920d56959f4eb06ca715aa9615e5136bd1.tar.gz archiva-7fcb02920d56959f4eb06ca715aa9615e5136bd1.zip |
NPE free and fix find user with only ldap
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1430639 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
2 files changed, 2 insertions, 2 deletions
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; |