Problem/Motivation
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.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork admin_toolbar-3471725
Show commands
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 commented