RM-3074: Deleted creators cause failures when declaring records

This commit is contained in:
Roy Wetherall
2016-08-22 15:06:43 +01:00
parent 7d30c1e9b0
commit 3bd4d2d74b
4 changed files with 67 additions and 15 deletions

View File

@@ -518,7 +518,8 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
{
for (String child : children)
{
if (!PermissionService.ALL_AUTHORITIES.equals(child))
if (authorityService.authorityExists(child) &&
!PermissionService.ALL_AUTHORITIES.equals(child))
{
authorityService.addAuthority(group, child);
}

View File

@@ -374,7 +374,9 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
// add the current owner to the list of extended writers
Set<String> modifiedWrtiers = new HashSet<String>(writers);
String owner = ownableService.getOwner(nodeRef);
if (StringUtils.isNotBlank(owner) && !owner.equals(OwnableService.NO_OWNER))
if (StringUtils.isNotBlank(owner) &&
!owner.equals(OwnableService.NO_OWNER) &&
authorityService.authorityExists(owner))
{
modifiedWrtiers.add(owner);
}