Closed (fixed)
Project:
Admin Toolbar
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2024 at 05:05 UTC
Updated:
21 Jul 2026 at 22:20 UTC
Jump to comment: Most recent
As per Super user access policy can be turned off Drupal is moving away from granting super access to user 1. The admin_toolbar_links_access_filter_filter_non_accessible_links function has an early return for user 1 and it should be removed.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mstrelan commentedComment #4
japerryMay need to do a check against a permission instead of the uid, but I don't know if we want to remove the 'full admin' return entirely.
Comment #5
mstrelan commentedI think we need to get a list of their roles and see if any of them are "isAdminRole". I wonder if there is a helper function to find this for a user. If not, maybe there should be.
Comment #6
mstrelan commentedI think we need to get a list of their roles and see if any of them are "isAdminRole". I wonder if there is a helper function to find this for a user. If not, maybe there should be.
Comment #7
dydave commentedComment #8
dydave commentedThanks a lot Michael (@mstrelan) for your help on this issue, it's greatly appreciated! 🙂
The changes suggested at #6 have been added to the merge request MR !97 👌
To be honest, I did not test this directly myself, since I'm not really using the
admin_toolbar_links_access_filtermodule anymore...I think it was marked
deprecatedand supposed to be removed when future releases drop support for core versions below 10.3.So personally, I wouldn't really be interested in working on this, but I would not be opposed to getting this added to the module.
If you could please help testing and reviewing the changes in the MR and if you think they could provide an acceptable compromise to Jakob's (@japerry) comment above at #4, then I would be glad to get these changes merged in.
Again, since we're looking at removing this module, we wouldn't be bothering with Tests, docs and such. But if getting this patch committed could help with your projects, we would certainly be glad to do so 🙂
We would greatly appreciate if you could please try testing merge request MR !97 and give us your feedback or reviews.
Feel free to let me know if you spot anything or if I missed anything else in the comments above, I would certainly be glad to help.
Thanks in advance!
Comment #9
prudloff commentedComment #11
dydave commentedThis issue has been pending review and testing for a while now...
I still could not test this locally, since I've rather been using more recent versions of Drupal core.
But after reviewing the changes again and since all the tests and jobs were still passing 🟢, I went ahead and merged the changes above at #10 🥳
Additional change: Updated README.md: Removed an "a" character in a sentence.
As requested in #3581063: Improve wording in README: remove unnecessary article "a".
At this point, all the work to be carried in this issue should have been completed, thus, marking it as Fixed for now. 👍
Feel free to let us know if you have any questions or concerns on any of the recent code changes or the module in general, we would surely be glad to help.
Thanks in advance for your testing feedback! 🙏