diff --git a/include/management/actions/class_Action.inc b/include/management/actions/class_Action.inc index bc9244c103d871799fa2253b5a74c6bcbd0c785a..405bd43c8f7cee9d94807bf774d9cb344dc7873b 100644 --- a/include/management/actions/class_Action.inc +++ b/include/management/actions/class_Action.inc @@ -157,6 +157,11 @@ class Action if ($this->callable === FALSE) { return; } + foreach ($action['targets'] as $targetDn) { + if (!$this->hasPermission($management->listing->getEntry($targetDn))) { + throw new FusionDirectoryException(sprintf(_('You are not allowed to execute action "%s" on target "%s"'), $this->name, $targetDn)); + } + } if (count($action['targets']) < $this->minTargets) { throw new FusionDirectoryException(sprintf(_('Not enough targets (%d) passed for action "%s"'), count($action['targets']), $this->name)); }