Remove check for user 1 in admin_toolbar_links_access_filter_filter_non_accessible_links

Created on 3 September 2024, 9 months ago

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

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mstrelan
  • Status changed to Needs review 9 months ago
  • πŸ‡¦πŸ‡ΊAustralia mstrelan
  • Pipeline finished with Success
    9 months ago
    Total: 439s
    #272161
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    May 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.

  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    I 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.

  • πŸ‡¦πŸ‡ΊAustralia mstrelan

    I 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.

  • πŸ‡«πŸ‡·France dydave

    Thanks 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_filter module anymore...

    I think it was marked deprecated and 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.

    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!

Production build 0.71.5 2024