Allow the admin page to remain visible when access is given to child items
2 open threads
Closes #3413508
Merge request reports
Activity
added 434 commits
- 011496f9...30dbdff2 - 424 earlier commits
- 15ac0b4e - Issue #3363424 by _shY, vbouchet, kim.pepper, smustgrave: Use CallableResolver...
- f1d04f61 - Issue #3410361 by claudiu.cristea, jonathan1055, lauriii: Fix the deprecation...
- 0d273393 - Issue #3277003 by mcdruid, catch, poker10, smustgrave, BramDriesen,...
- 9586ced5 - Issue #3187770 by godotislate, smustgrave, catch, quietone: Views Rendered...
- ed1c6900 - Issue #3384936 by marvil07, vbouchet, smustgrave, xjm, joachim: Use the API to...
- 57ca853a - Issue #2254209 by smustgrave, marvil07, quietone, sun, catch, Wim Leers: Fix...
- e7ab9440 - Issue #2957279 by alexpott, pguillard, chr.fritsch, Wim Leers: Fix typo in...
- de43ae83 - Issue #3412422 by dww, catch, longwave, jwilson3, smustgrave: Use 'present'...
- 2d5e3483 - Issue #3413430 by catch, smustgrave: Add @group #slow to AddPermissionsUpdateTest
- 996fd5ab - Allow the admin page to remain visible when access is given to child items
Toggle commit listadded 13 commits
-
996fd5ab...c6eb9052 - 12 commits from branch
project:11.x
- f5ef7092 - Merge branch drupal:11.x into 3413508-admin-page-access
-
996fd5ab...c6eb9052 - 12 commits from branch
added 1 commit
- 391f7dcd - Reword comments explaining what the tests do
added 6 commits
-
391f7dcd...4f633dcc - 5 commits from branch
project:11.x
- 7de1de45 - Merge branch drupal:11.x into 3413508-admin-page-access
-
391f7dcd...4f633dcc - 5 commits from branch
added 308 commits
-
7de1de45...985b057b - 307 commits from branch
project:11.x
- 90e431a0 - Merge branch '11.x' into 3413508-admin-page-access
-
7de1de45...985b057b - 307 commits from branch
117 111 118 112 // If access is allowed to this element in the tree check for access to 119 113 // its own children. changed this line in version 10 of the diff
101 101 102 if (empty($tree)) { 103 $route = $this->router->getRouteCollection()->get($link->getRouteName()); 104 if ($route) { 105 return AccessResult::allowedIf( 106 empty($route->getRequirement('_access_admin_menu_block_page')) 107 && empty($route->getRequirement('_access_admin_overview_page')) 108 ); 109 } 110 return AccessResult::neutral(); 102 $route = $this->router->getRouteCollection()->get($link->getRouteName()); 103 if ($route && empty($route->getRequirement('_access_admin_menu_block_page')) && empty($route->getRequirement('_access_admin_overview_page'))) { 104 return AccessResult::allowed(); 111 105 } 112 106 113 107 foreach ($tree as $element) { - Comment on lines 100 to 113
Given the above change to not check if $tree is empty we can then make the following performance improvement:
100 $tree = $this->menuLinkTree->load(NULL, $parameters); 101 102 $route = $this->router->getRouteCollection()->get($link->getRouteName()); 103 if ($route && empty($route->getRequirement('_access_admin_menu_block_page')) && empty($route->getRequirement('_access_admin_overview_page'))) { 104 return AccessResult::allowed(); 105 } 106 107 foreach ($tree as $element) { 100 $route = $this->router->getRouteCollection()->get($link->getRouteName()); 101 if ($route && empty($route->getRequirement('_access_admin_menu_block_page')) && empty($route->getRequirement('_access_admin_overview_page'))) { 102 return AccessResult::allowed(); 103 } 104 105 foreach ($this->menuLinkTree->load(NULL, $parameters) as $element) { changed this line in version 10 of the diff
added 163 commits
-
955b4e67...bd4b8b98 - 162 commits from branch
project:11.x
- 59dc28c3 - Merge branch '11.x' into 3413508-admin-page-access
-
955b4e67...bd4b8b98 - 162 commits from branch
added 85 commits
-
59dc28c3...1bcc7f34 - 84 commits from branch
project:11.x
- f52484f4 - Merge branch '11.x' of git.drupal.org:project/drupal into 3413508-admin-page-access
-
59dc28c3...1bcc7f34 - 84 commits from branch
Please register or sign in to reply