mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
monitoring: Fix permissions used in the toggle object features command form
This commit is contained in:
parent
32f87284ad
commit
164a61cb84
@ -36,27 +36,27 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
|
|||||||
$features = array(
|
$features = array(
|
||||||
ToggleObjectFeatureCommand::FEATURE_ACTIVE_CHECKS => array(
|
ToggleObjectFeatureCommand::FEATURE_ACTIVE_CHECKS => array(
|
||||||
'label' => $this->translate('Active Checks'),
|
'label' => $this->translate('Active Checks'),
|
||||||
'permission' => 'monitoring/command/feature/active-checks'
|
'permission' => 'monitoring/command/feature/object/active-checks'
|
||||||
),
|
),
|
||||||
ToggleObjectFeatureCommand::FEATURE_PASSIVE_CHECKS => array(
|
ToggleObjectFeatureCommand::FEATURE_PASSIVE_CHECKS => array(
|
||||||
'label' => $this->translate('Passive Checks'),
|
'label' => $this->translate('Passive Checks'),
|
||||||
'permission' => 'monitoring/command/feature/passive-checks'
|
'permission' => 'monitoring/command/feature/object/passive-checks'
|
||||||
),
|
),
|
||||||
ToggleObjectFeatureCommand::FEATURE_OBSESSING => array(
|
ToggleObjectFeatureCommand::FEATURE_OBSESSING => array(
|
||||||
'label' => $this->translate('Obsessing'),
|
'label' => $this->translate('Obsessing'),
|
||||||
'permission' => 'monitoring/command/feature/obsessing'
|
'permission' => 'monitoring/command/feature/object/obsessing'
|
||||||
),
|
),
|
||||||
ToggleObjectFeatureCommand::FEATURE_NOTIFICATIONS => array(
|
ToggleObjectFeatureCommand::FEATURE_NOTIFICATIONS => array(
|
||||||
'label' => $this->translate('Notifications'),
|
'label' => $this->translate('Notifications'),
|
||||||
'permission' => 'monitoring/command/feature/notifications'
|
'permission' => 'monitoring/command/feature/object/notifications'
|
||||||
),
|
),
|
||||||
ToggleObjectFeatureCommand::FEATURE_EVENT_HANDLER => array(
|
ToggleObjectFeatureCommand::FEATURE_EVENT_HANDLER => array(
|
||||||
'label' => $this->translate('Event Handler'),
|
'label' => $this->translate('Event Handler'),
|
||||||
'permission' => 'monitoring/command/feature/event-handler'
|
'permission' => 'monitoring/command/feature/object/event-handler'
|
||||||
),
|
),
|
||||||
ToggleObjectFeatureCommand::FEATURE_FLAP_DETECTION => array(
|
ToggleObjectFeatureCommand::FEATURE_FLAP_DETECTION => array(
|
||||||
'label' => $this->translate('Flap Detection'),
|
'label' => $this->translate('Flap Detection'),
|
||||||
'permission' => 'monitoring/command/feature/flap-detection'
|
'permission' => 'monitoring/command/feature/object/flap-detection'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (preg_match('~^v2\.\d+\.\d+.*$~', $this->getIcingaVersion())) {
|
if (preg_match('~^v2\.\d+\.\d+.*$~', $this->getIcingaVersion())) {
|
||||||
@ -73,7 +73,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
|
|||||||
foreach ($this->features as $feature => $spec) {
|
foreach ($this->features as $feature => $spec) {
|
||||||
$options = array(
|
$options = array(
|
||||||
'autosubmit' => true,
|
'autosubmit' => true,
|
||||||
'disabled' => $this->hasPermission($spec['permission']) ? '' : 'disabled',
|
'disabled' => $this->hasPermission($spec['permission']) ? null : 'disabled',
|
||||||
'label' => $spec['label']
|
'label' => $spec['label']
|
||||||
);
|
);
|
||||||
if ($formData[$feature . '_changed']) {
|
if ($formData[$feature . '_changed']) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user