SEC-421: MutableAcl.setParent(MutableAcl) method to accept Acl parameter, not MutableAcl.

This commit is contained in:
Ben Alex 2007-05-25 02:22:18 +00:00
parent d0d645788a
commit 95735017e6
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ public interface MutableAcl extends Acl {
* *
* @param newParent the new parent * @param newParent the new parent
*/ */
void setParent(MutableAcl newParent); void setParent(Acl newParent);
void updateAce(Serializable aceId, Permission permission) void updateAce(Serializable aceId, Permission permission)
throws NotFoundException; throws NotFoundException;

View File

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