Browse Source

SEC-572: Permit null parent for an AclImpl.

2.0.x
Ben Alex 18 years ago
parent
commit
9e9b69ec8f
  1. 3
      acl/src/main/java/org/springframework/security/acls/domain/AclImpl.java

3
acl/src/main/java/org/springframework/security/acls/domain/AclImpl.java

@ -335,8 +335,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl { @@ -335,8 +335,7 @@ public class AclImpl implements Acl, MutableAcl, AuditableAcl, OwnershipAcl {
public void setParent(Acl newParent) {
aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
Assert.notNull(newParent, "New Parent required");
Assert.isTrue(!newParent.equals(this), "Cannot be the parent of yourself");
Assert.isTrue(newParent == null || !newParent.equals(this), "Cannot be the parent of yourself");
this.parentAcl = newParent;
}

Loading…
Cancel
Save