Closed (cannot reproduce)
Project:
Administration links access filter
Version:
8.x-1.0-alpha3
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2016 at 14:51 UTC
Updated:
1 Apr 2017 at 15:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
agoradesign commentedHi,
unfortunately I was not able to reproduce this, although I followed your instructions. I've tried a few different setups - with admin_toolbar and admin_toolbar_tools enabled, only with admin_toolbar enabled, without both modules - every setup worked as expected.
However, I've attached a patch, which could probably solve your problem. Within admin_links_access_filter_preprocess_admin_block_content() I'm currently skipping access check on any link that is pointing to a Views page because the route-based access check didn't work there properly. That also means that links to non-accessible Views pages still show up there. At the time of writing these lines, I've also added a TODO comment there to find a generic solution instead of skipping the check.
The attached patch is copying these lines to the menu item filtering process. However, this is just a quick shoot from the hip, just to see, if this would solve your problem. Before I'd commit this, some further investigation would be needed, e.g. why I only inserted this check in the mentioned admin_block_content preprocess, but not in the menu preprocess.
Comment #3
grahlThank you for your patch, however, it did not solve my problem.
I can now amend that the role itself does not actually cause the problem but something in the way the menu is built does.
I can reliably recreate the error but only on one site by clearing the entire cache. I get into a consistent state if I use admin_toolbar_tools to just flush the routing and menu cache or if I save a View. If I attempt to run flush_menu() procedurally to narrow things down I am not able to get into a consistent state. The problem occurs without having admin_toolbar_tools or admin_toolbar installed.
I am closing this issue since I am not able to produce a test case with a clean site. I've solved my specific problem just by unsetting the few items I need to not be available by hand.