Fixed exception in ElementPermissionListener.

This commit is contained in:
Jan Böhmer 2019-11-16 21:40:23 +01:00
parent ffdeacc2ca
commit b48b9b78b4

View file

@ -189,7 +189,7 @@ class ElementPermissionListener
//If the user is not allowed to edit or read this property, reset all values.
if ((!$this->isGranted('read', $annotation, $element)
|| !$this->isGranted('edit', $annotation->getReadOperationName(), $element))) {
|| !$this->isGranted('edit', $annotation, $element))) {
//Set value to old value, so that there a no change to this property
if (isset($old_data[$property->getName()])) {
$property->setValue($element, $old_data[$property->getName()]);