prevent issues when changing role manager implementation

git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1471396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-04-24 13:14:37 +00:00
parent 85ea600465
commit 420044caa5
1 changed files with 12 additions and 2 deletions

View File

@ -721,8 +721,18 @@ public abstract class AbstractRBACManager
try
{
Role child = getRole( roleName );
childRoles.put( child.getName(), child );
updatedChildRoleList.add( roleName );
// archiva can change role manager but LDAP can be non writable so in such case
// some roles doesn't exists !!
if ( child != null )
{
childRoles.put( child.getName(), child );
updatedChildRoleList.add( roleName );
}
else
{
log.warn(
"error searching role with name '{}' probably some issues when migrating your role manager" );
}
}
catch ( RbacObjectNotFoundException e )
{