diff --git a/composer.json b/composer.json index 16f5bc993..6e909675a 100644 --- a/composer.json +++ b/composer.json @@ -156,6 +156,7 @@ "drupal/link_attributes": "^2.1", "drupal/media_library_edit": "^3.0", "drupal/media_responsive_thumbnail": "^1.2", + "drupal/menu_admin_per_menu": "*", "drupal/menu_block": "^1.8", "drupal/menu_position": "^1.0@beta", "drupal/metatag": "^2.0", diff --git a/modules/wri_admin/wri_admin.info.yml b/modules/wri_admin/wri_admin.info.yml index c63faeeb9..874a0e729 100644 --- a/modules/wri_admin/wri_admin.info.yml +++ b/modules/wri_admin/wri_admin.info.yml @@ -42,6 +42,7 @@ dependencies: - link_attributes_menu_link_content - media_responsive_thumbnail - menu_ui + - menu_admin_per_menu - paragraphs - rename_admin_paths - responsive_tables_filter diff --git a/modules/wri_admin/wri_admin.install b/modules/wri_admin/wri_admin.install index 6777389dd..8442caa41 100644 --- a/modules/wri_admin/wri_admin.install +++ b/modules/wri_admin/wri_admin.install @@ -28,3 +28,13 @@ function wri_admin_update_10001() { \Drupal::service('distro_helper.updates')->installConfig('better_passwords.settings', 'wri_admin', 'post-install'); \Drupal::service('distro_helper.updates')->installConfig('rename_admin_paths.settings', 'wri_admin', 'post-install'); } + +/** + * Enable the module menu_admin_per_menu and pulls config. + */ +function wri_admin_update_10002() { + $moduleHandler = \Drupal::service('module_handler'); + if (!$moduleHandler->moduleExists('menu_admin_per_menu')) { + \Drupal::service('module_installer')->install(['menu_admin_per_menu'], TRUE); + } +} diff --git a/modules/wri_package2/config/post-install/user.role.hr.yml b/modules/wri_package2/config/post-install/user.role.hr.yml index ceb52bb52..5ea714043 100644 --- a/modules/wri_package2/config/post-install/user.role.hr.yml +++ b/modules/wri_package2/config/post-install/user.role.hr.yml @@ -27,6 +27,7 @@ dependencies: - filter - layout_builder - media + - menu_admin_per_menu - node - path - scheduled_transitions @@ -40,6 +41,7 @@ weight: 3 is_admin: null permissions: - 'access administration pages' + - 'access block library' - 'access contextual links' - 'access files entity browser pages' - 'access files overview' @@ -47,7 +49,11 @@ permissions: - 'access tokens overview' - 'access toolbar' - 'access tweets entity browser pages' + - 'administer block content' + - 'administer block types' - 'administer blocks' + - 'administer page-hierarchies menu items' + - 'configure editable article node layout overrides' - 'create and edit custom blocks' - 'create document media' - 'create image media' @@ -62,6 +68,7 @@ permissions: - 'delete any page content' - 'delete media' - 'delete own document media' + - 'delete own files' - 'delete own image media' - 'delete own person content' - 'delete own video media' diff --git a/modules/wri_package2/wri_package2.install b/modules/wri_package2/wri_package2.install index 1583b506f..3e1adb889 100644 --- a/modules/wri_package2/wri_package2.install +++ b/modules/wri_package2/wri_package2.install @@ -259,3 +259,10 @@ function _set_anonymous_authenticated_permissions() { \Drupal::service('distro_helper.updates')->installConfig('user.role.editorial', 'wri_package2', 'post-install', TRUE); \Drupal::service('distro_helper.updates')->installConfig('user.role.hr', 'wri_package2', 'post-install', TRUE); } + +/** + * Set updated HR permissions using menu_admin_per_menu. + */ +function wri_package2_update_10001() { + \Drupal::service('distro_helper.updates')->installConfig('user.role.hr', 'wri_package2', 'post-install', TRUE); +}