From c790e6af61aed70126a0f0e5516f6a8b9182abb7 Mon Sep 17 00:00:00 2001 From: naomi Date: Sun, 10 Jul 2022 14:01:49 +0100 Subject: [PATCH] added specific permission 4 "add new things" menu --- opencase.permissions.yml | 4 ++++ opencase.routing.yml | 6 +++--- opencase.services.yml | 7 ++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/opencase.permissions.yml b/opencase.permissions.yml index 6ccbc51..7318915 100644 --- a/opencase.permissions.yml +++ b/opencase.permissions.yml @@ -2,4 +2,8 @@ use opencase: title: 'Use OpenCase' description: 'Use the OpenCase case management system' restrict access: true +view opencase add new things menu: + title: 'View OpenCase "add new things" menu' + description: 'View OpenCase "add new things" menu' + restrict access: true diff --git a/opencase.routing.yml b/opencase.routing.yml index 710df9c..fcdbb7a 100644 --- a/opencase.routing.yml +++ b/opencase.routing.yml @@ -5,12 +5,12 @@ opencase.opencase_admin_menu: opencase.opencase_cases_menu: path: '/' requirements: - _permission: 'use opencase' + _permission: 'view all published case entities' opencase.opencase_add_new_things_menu: path: '/' requirements: - _permission: 'use opencase' + _permission: 'view add new things menu' opencase.opencase_reporting_menu: path: '/' requirements: - _permission: 'use opencase' + _permission: 'view reporting menu' diff --git a/opencase.services.yml b/opencase.services.yml index eee55d8..2aa7b59 100644 --- a/opencase.services.yml +++ b/opencase.services.yml @@ -5,4 +5,9 @@ services: # Priority determines the order in which Breadcrumb services run. tags: - - { name: breadcrumb_builder, priority: 100 } \ No newline at end of file + - { name: breadcrumb_builder, priority: 100 } + + opencase.subscriber: + class: Drupal\opencase\EventSubscriber\OpencaseSubscriber + tags: + - { name: event_subscriber } \ No newline at end of file