diff --git a/custom/modules/ior/ior.links.menu.yml b/custom/modules/ior/ior.links.menu.yml deleted file mode 100644 index 173543b8..00000000 --- a/custom/modules/ior/ior.links.menu.yml +++ /dev/null @@ -1,13 +0,0 @@ -system.admin.unblib.ior: - title: Images of Research - description: 'Manage Images of Research contests' - route_name: 'view.ior_contests.page_1' - parent: system.admin.unblib - weight: 100 - -system.admin.unblib.ior.contest: - title: Contests - description: 'Manage contests' - route_name: 'view.ior_contests.page_1' - parent: system.admin.unblib.ior - weight: 0 diff --git a/custom/modules/ior/ior.module b/custom/modules/ior/ior.module index 9b45d485..669bd465 100644 --- a/custom/modules/ior/ior.module +++ b/custom/modules/ior/ior.module @@ -383,23 +383,3 @@ function ior_update_9004(&$sandbox) { ->fields(['bundle' => 'image']) ->execute(); } - -/** - * Implements hook_menu_links_discovered_alter(). - */ -function ior_menu_links_discovered_alter(&$links) { - $user = Drupal::service(('current_user')); - $ior_roles = array_filter($user->getAccount()->getRoles(), function ($role) { - return $role === 'ior_manager' || $role === 'ior_reviewer'; - }); - - if (!count($ior_roles)) { - $ior_link_ids = array_filter(array_keys($links), function ($link_id) { - return preg_match("/^system.admin.unblib.ior/", $link_id); - }); - - foreach ($ior_link_ids as $link_id) { - unset($links[$link_id]); - } - } -}