
| Key: |
SEC-597
|
| Type: |
Improvement
|
| Status: |
Closed
|
| Resolution: |
Duplicate
|
| Priority: |
Major
|
| Assignee: |
Ben Alex
|
| Reporter: |
Emanuel
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
I think it should be possible to change the parent of a directory to null:
Sample Scenario:
Filebrowser that manages a directory structure (the directories are secured by acegi). Now i want to move a nested directory to Root-Level. The parent-property of the corresponding ACL has to be changed to NULL.
Solution:
Simply change:
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");
this.parentAcl = newParent;
}
to
public void setParent(Acl newParent) {
aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
Assert.isTrue(newParent == null || !newParent.equals(this), "Cannot be the parent of yourself");
this.parentAcl = newParent;
}
|
|
Description
|
I think it should be possible to change the parent of a directory to null:
Sample Scenario:
Filebrowser that manages a directory structure (the directories are secured by acegi). Now i want to move a nested directory to Root-Level. The parent-property of the corresponding ACL has to be changed to NULL.
Solution:
Simply change:
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");
this.parentAcl = newParent;
}
to
public void setParent(Acl newParent) {
aclAuthorizationStrategy.securityCheck(this, AclAuthorizationStrategy.CHANGE_GENERAL);
Assert.isTrue(newParent == null || !newParent.equals(this), "Cannot be the parent of yourself");
this.parentAcl = newParent;
}
|
Show » |
| There are no comments yet on this issue.
|
|