monitoring: Group permissions by topic where it makes sense, i.e. downtime and comment

This commit is contained in:
Eric Lippmann 2015-01-22 16:56:00 +01:00
parent 251030e1d8
commit 9a59f3529c
3 changed files with 24 additions and 24 deletions

View File

@ -58,7 +58,7 @@ class Monitoring_HostController extends MonitoredObjectController
*/
public function addCommentAction()
{
$this->assertPermission('monitoring/command/add-comment');
$this->assertPermission('monitoring/command/comment/add');
$this->view->title = $this->translate('Add Host Comment');
$this->handleCommandForm(new AddCommentCommandForm());
@ -80,7 +80,7 @@ class Monitoring_HostController extends MonitoredObjectController
*/
public function scheduleDowntimeAction()
{
$this->assertPermission('monitoring/command/schedule-downtime');
$this->assertPermission('monitoring/command/downtime/schedule');
$this->view->title = $this->translate('Schedule Host Downtime');
$this->handleCommandForm(new ScheduleHostDowntimeCommandForm());

View File

@ -58,7 +58,7 @@ class Monitoring_ServiceController extends MonitoredObjectController
*/
public function addCommentAction()
{
$this->assertPermission('monitoring/command/add-comment');
$this->assertPermission('monitoring/command/comment/add');
$this->view->title = $this->translate('Add Service Comment');
$this->handleCommandForm(new AddCommentCommandForm());
@ -80,7 +80,7 @@ class Monitoring_ServiceController extends MonitoredObjectController
*/
public function scheduleDowntimeAction()
{
$this->assertPermission('monitoring/command/schedule-downtime');
$this->assertPermission('monitoring/command/downtime/schedule');
$this->view->title = $this->translate('Schedule Service Downtime');
$this->handleCommandForm(new ScheduleServiceDowntimeCommandForm());

View File

@ -8,41 +8,41 @@ $this->providePermission(
'monitoring/command/*',
$this->translate('Allow all commands')
);
$this->providePermission(
'monitoring/command/schedule*',
$this->translate('Allow scheduling checks and downtimes')
);
$this->providePermission(
'monitoring/command/schedule-check',
$this->translate('Allow scheduling host and service checks')
);
$this->providePermission(
'monitoring/command/schedule-downtime',
$this->translate('Allow scheduling host and service downtimes')
);
$this->providePermission(
'monitoring/command/acknowledge-problem',
$this->translate('Allow acknowledging host and service problems')
);
$this->providePermission(
'monitoring/command/add-comment',
$this->translate('Allow commenting on hosts and services')
);
$this->providePermission(
'monitoring/command/remove*',
$this->translate('Allow removing problem acknowledgements, host and service comments and downtimes')
);
$this->providePermission(
'monitoring/command/remove-acknowledgement',
$this->translate('Allow removing problem acknowledgements')
);
$this->providePermission(
'monitoring/command/remove-comment',
$this->translate('Allow removing host and service comments')
'monitoring/command/comment/*',
$this->translate('Allow adding and deleting host and service comments')
);
$this->providePermission(
'monitoring/command/remove-downtime',
$this->translate('Allow removing host and service downtimes')
'monitoring/command/comment/add',
$this->translate('Allow commenting on hosts and services')
);
$this->providePermission(
'monitoring/command/comment/delete',
$this->translate('Allow deleting host and service comments')
);
$this->providePermission(
'monitoring/command/downtime/*',
$this->translate('Allow scheduling and deleting host and service downtimes')
);
$this->providePermission(
'monitoring/command/downtime/schedule',
$this->translate('Allow scheduling host and service downtimes')
);
$this->providePermission(
'monitoring/command/downtime/delete',
$this->translate('Allow deleting host and service downtimes')
);
$this->providePermission(
'monitoring/command/process-check-result',