Skip to content

Commit

Permalink
Merge pull request #292 from wri/WRI-445--submenu-links
Browse files Browse the repository at this point in the history
Wri 445  submenu links
  • Loading branch information
mariacha authored Jul 31, 2024
2 parents fa6962d + aa7721a commit 9901f39
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions modules/wri_admin/wri_admin.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions modules/wri_admin/wri_admin.install
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
7 changes: 7 additions & 0 deletions modules/wri_package2/config/post-install/user.role.hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies:
- filter
- layout_builder
- media
- menu_admin_per_menu
- node
- path
- scheduled_transitions
Expand All @@ -40,14 +41,19 @@ weight: 3
is_admin: null
permissions:
- 'access administration pages'
- 'access block library'
- 'access contextual links'
- 'access files entity browser pages'
- 'access files overview'
- 'access media overview'
- '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'
Expand All @@ -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'
Expand Down
7 changes: 7 additions & 0 deletions modules/wri_package2/wri_package2.install
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 9901f39

Please sign in to comment.