monitoring/security: Guard toggling object features

Toggling object features will only be possible if the user has the permission monitoring/command/feature/object.
This commit is contained in:
Eric Lippmann 2015-01-30 10:31:49 +01:00
parent 35b33647cf
commit bdc637ff67
1 changed files with 1 additions and 0 deletions

View File

@ -107,6 +107,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
*/
public function onSuccess()
{
$this->assertPermission('monitoring/command/feature/object');
foreach ($this->objects as $object) {
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
foreach ($this->getValues() as $feature => $enabled) {