diff --git a/redback-rbac/redback-rbac-model/src/main/java/org/apache/archiva/redback/rbac/AbstractRBACManager.java b/redback-rbac/redback-rbac-model/src/main/java/org/apache/archiva/redback/rbac/AbstractRBACManager.java index be3f8df0..2ff30c22 100644 --- a/redback-rbac/redback-rbac-model/src/main/java/org/apache/archiva/redback/rbac/AbstractRBACManager.java +++ b/redback-rbac/redback-rbac-model/src/main/java/org/apache/archiva/redback/rbac/AbstractRBACManager.java @@ -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 ) {