diff options
author | Toni Uebernickel <tuebernickel@gmail.com> | 2012-01-18 18:00:58 +0100 |
---|---|---|
committer | Toni Uebernickel <tuebernickel@gmail.com> | 2012-01-30 14:16:44 +0100 |
commit | 1e7059f6b49abdf26ceeec3e4e2f9ca149fbbc0b (patch) | |
tree | 9923c45c8ecc7b61833dc709775a3458a22af2db | |
parent | 1c7baca3ae299de80754f7dcb94ee4a7637f7f74 (diff) | |
download | symfony-security-1e7059f6b49abdf26ceeec3e4e2f9ca149fbbc0b.zip symfony-security-1e7059f6b49abdf26ceeec3e4e2f9ca149fbbc0b.tar.gz symfony-security-1e7059f6b49abdf26ceeec3e4e2f9ca149fbbc0b.tar.bz2 |
allow unsetting parentAcl on MutableAclInterface
-rw-r--r-- | Acl/Domain/Acl.php | 4 | ||||
-rw-r--r-- | Acl/Model/MutableAclInterface.php | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Acl/Domain/Acl.php b/Acl/Domain/Acl.php index 4a4a2e2..a890bbe 100644 --- a/Acl/Domain/Acl.php +++ b/Acl/Domain/Acl.php @@ -311,9 +311,9 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged /** * {@inheritDoc} */ - public function setParentAcl(AclInterface $acl) + public function setParentAcl(AclInterface $acl = null) { - if (null === $acl->getId()) { + if (null !== $acl && null === $acl->getId()) { throw new \InvalidArgumentException('$acl must have an ID.'); } diff --git a/Acl/Model/MutableAclInterface.php b/Acl/Model/MutableAclInterface.php index 521d307..a846a9f 100644 --- a/Acl/Model/MutableAclInterface.php +++ b/Acl/Model/MutableAclInterface.php @@ -114,9 +114,10 @@ interface MutableAclInterface extends AclInterface /** * Sets the parent ACL * - * @param AclInterface $acl + * @param AclInterface|null $acl + * @return void */ - function setParentAcl(AclInterface $acl); + function setParentAcl(AclInterface $acl = null); /** * Updates a class-based ACE |