mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-25 23:04:53 +02:00
Notifications: allow access to apply rules with...
...director/notifications permission fixes #1015
This commit is contained in:
parent
188349a3c1
commit
1c4d6598c0
@ -19,6 +19,11 @@ class NotificationsController extends ObjectsController
|
|||||||
throw new NotFoundError('Not found');
|
throw new NotFoundError('Not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function assertApplyRulePermission()
|
||||||
|
{
|
||||||
|
return $this->assertPermission('director/notifications');
|
||||||
|
}
|
||||||
|
|
||||||
protected function checkDirectorPermissions()
|
protected function checkDirectorPermissions()
|
||||||
{
|
{
|
||||||
$this->assertPermission('director/notifications');
|
$this->assertPermission('director/notifications');
|
||||||
|
@ -109,10 +109,15 @@ abstract class ObjectsController extends ActionController
|
|||||||
: TemplatesTable::create($type, $this->db())->renderTo($this);
|
: TemplatesTable::create($type, $this->db())->renderTo($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function assertApplyRulePermission()
|
||||||
|
{
|
||||||
|
return $this->assertPermission('director/admin');
|
||||||
|
}
|
||||||
|
|
||||||
public function applyrulesAction()
|
public function applyrulesAction()
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->assertPermission('director/admin')
|
->assertApplyRulePermission()
|
||||||
->addObjectsTabs()
|
->addObjectsTabs()
|
||||||
->addTitle(
|
->addTitle(
|
||||||
$this->translate('All your %s Apply Rules'),
|
$this->translate('All your %s Apply Rules'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user