admin_toolbar_links_access_filter_admin_block_content

should be

admin_toolbar_links_access_filter_preprocess_admin_block_content

No admin blocks currently get their access fixed when viewing config pages etc.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

icondigital created an issue. See original summary.

almunnings’s picture

Status: Active » Needs review
idebr’s picture

This code was copied over in #2919346: Don't show menu links that you don't have access permission for, but I am not sure this hook is even necessary. The links in admin_block_content are already being filtered in \Drupal\system\Controller\SystemController::overview() through MenuTreeManipulators:

   $manipulators = [
      ['callable' => 'menu.default_tree_manipulators:checkAccess'],
      ['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'],
    ];

Perhaps you can provide a failing test that shows this code is actually still necessary?

romainj’s picture

I agree with @idebr that function is not even necessary. Here is the corresponding patch.

adriancid’s picture

Title: template_preprocess_admin_block_content » The implementation of the template_preprocess_admin_block_content hook is not needed

  • adriancid committed 932de2f on 8.x-2.x authored by romainj
    Issue #3026731 by Al Munnings, romainj, idebr, adriancid: The...

  • adriancid committed b256c2e on 8.x-1.x authored by romainj
    Issue #3026731 by Al Munnings, romainj, idebr, adriancid: The...
adriancid’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.