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:
parent
35b33647cf
commit
bdc637ff67
|
@ -107,6 +107,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
|
||||||
*/
|
*/
|
||||||
public function onSuccess()
|
public function onSuccess()
|
||||||
{
|
{
|
||||||
|
$this->assertPermission('monitoring/command/feature/object');
|
||||||
foreach ($this->objects as $object) {
|
foreach ($this->objects as $object) {
|
||||||
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
foreach ($this->getValues() as $feature => $enabled) {
|
foreach ($this->getValues() as $feature => $enabled) {
|
||||||
|
|
Loading…
Reference in New Issue