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
This commit is contained in:
Olivier Lamy 2013-01-09 00:05:50 +00:00
parent 7b7135cff7
commit 7fcb02920d
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ public class ArchivaAuthorizer
authorizationException = e; authorizationException = e;
} }
if ( result.isAuthorized() ) if ( result != null && result.isAuthorized() )
{ {
return result; return result;
} }

View File

@ -449,7 +449,7 @@ public class ArchivaConfigurableUsersManager
throws UserManagerException throws UserManagerException
{ {
UserManager userManager = findFirstWritable(); UserManager userManager = findFirstWritable();
if ( userManager.isReadOnly() ) if ( userManager == null )
{ {
log.warn( "cannot find writable user manager implementation, skip guest user creation" ); log.warn( "cannot find writable user manager implementation, skip guest user creation" );
return null; return null;