Notifications: allow access to apply rules with...

...director/notifications permission

fixes #1015
This commit is contained in:
Thomas Gelf 2017-07-14 11:20:11 +02:00
parent 188349a3c1
commit 1c4d6598c0
2 changed files with 11 additions and 1 deletions

View File

@ -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');

View File

@ -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'),