Fix permission send-custom-notification

refs #8644
This commit is contained in:
Marius Hein 2015-03-12 16:40:32 +01:00
parent df3d81e181
commit ddd280d57b
3 changed files with 8 additions and 0 deletions

View File

@ -31,12 +31,14 @@
null, null,
array('icon' => 'reply') array('icon' => 'reply')
); ?></div> ); ?></div>
<?php if ($this->hasPermission('monitoring/command/send-custom-notification')): ?>
<div><?= $this->qlink( <div><?= $this->qlink(
sprintf($this->translate('Send a custom notification for all %u hosts'), $hostCount), sprintf($this->translate('Send a custom notification for all %u hosts'), $hostCount),
$sendCustomNotificationLink, $sendCustomNotificationLink,
null, null,
array('icon' => 'comment') array('icon' => 'comment')
); ?></div> ); ?></div>
<?php endif; ?>
<?php if (($unhandledCount = count($unhandledObjects)) > 0): ?> <?php if (($unhandledCount = count($unhandledObjects)) > 0): ?>
<div> <div>
<h3><?= sprintf( <h3><?= sprintf(

View File

@ -31,12 +31,14 @@
null, null,
array('icon' => 'reply') array('icon' => 'reply')
); ?></div> ); ?></div>
<?php if ($this->hasPermission('monitoring/command/send-custom-notification')): ?>
<div><?= $this->qlink( <div><?= $this->qlink(
sprintf($this->translate('Send a custom notification for all %u services'), $serviceCount), sprintf($this->translate('Send a custom notification for all %u services'), $serviceCount),
$sendCustomNotificationLink, $sendCustomNotificationLink,
null, null,
array('icon' => 'comment') array('icon' => 'comment')
); ?></div> ); ?></div>
<?php endif; ?>
<?php if (($unhandledCount = count($unhandledObjects)) > 0): ?> <?php if (($unhandledCount = count($unhandledObjects)) > 0): ?>
<div> <div>
<h3><?= sprintf( <h3><?= sprintf(

View File

@ -55,6 +55,10 @@ $this->providePermission(
'monitoring/command/feature/object', 'monitoring/command/feature/object',
$this->translate('Allow processing commands for toggling features on host and service objects') $this->translate('Allow processing commands for toggling features on host and service objects')
); );
$this->providesPermission(
'monitoring/command/send-custom-notification',
$this->translate('Allow sending custom notifications for hosts and services');
);
$this->provideRestriction( $this->provideRestriction(
'monitoring/hosts/filter', 'monitoring/hosts/filter',