diff --git a/application/controllers/NotificationsController.php b/application/controllers/NotificationsController.php index 5ed02a04..2ddb360d 100644 --- a/application/controllers/NotificationsController.php +++ b/application/controllers/NotificationsController.php @@ -19,6 +19,11 @@ class NotificationsController extends ObjectsController throw new NotFoundError('Not found'); } + protected function assertApplyRulePermission() + { + return $this->assertPermission('director/notifications'); + } + protected function checkDirectorPermissions() { $this->assertPermission('director/notifications'); diff --git a/library/Director/Web/Controller/ObjectsController.php b/library/Director/Web/Controller/ObjectsController.php index 86ed081c..8227a327 100644 --- a/library/Director/Web/Controller/ObjectsController.php +++ b/library/Director/Web/Controller/ObjectsController.php @@ -109,10 +109,15 @@ abstract class ObjectsController extends ActionController : TemplatesTable::create($type, $this->db())->renderTo($this); } + protected function assertApplyRulePermission() + { + return $this->assertPermission('director/admin'); + } + public function applyrulesAction() { $this - ->assertPermission('director/admin') + ->assertApplyRulePermission() ->addObjectsTabs() ->addTitle( $this->translate('All your %s Apply Rules'),