With the latest release of admin_toolbar 8.x-2.2, during the update the admin_toolbar_search sub-module is auto-installed.
For users without permission to "Use Admin Toolbar search", the search box shows still shows as un-styled and breaks the layout of admin toolbar menu.
Screenshots attached.

After giving "Use Admin Toolbar search", the search shows correctly.

The search box should not show for Users without "Use Admin Toolbar search" permission.

CommentFileSizeAuthor
ats_issue_2.jpg26.42 KBnanobyt3
ats_issue_1.jpg18.15 KBnanobyt3

Comments

nanobyt3 created an issue. See original summary.

hoporr’s picture

Confirming this.
Only option right now is to disable the search, which, obviously, defeats the purpose.

anruether’s picture

Status: Active » Closed (duplicate)
Related issues: +#3091968: Do not show Search if user does not have the correct permission

The related issue got committed but does not have a release yet. In the meantime you can use the patch or update to dev.

thomwilhelm’s picture

Status: Closed (duplicate) » Active

I don't think this is a duplicate of that ticket. The patch in comment #19 from the ticket you mentioned as a duplicate #3091968 is already in the latest stable release 2.2.

The last comment on that ticket was asking for a new ticket to be raised after the issue still persisted, so this is it.

thomwilhelm’s picture

Status: Active » Closed (duplicate)
Related issues: +#3126311: Check permissions before displaying the search menu item

So turns out this is fixed in dev, patch is here on ticket 3126311:

https://www.drupal.org/project/admin_toolbar/issues/3126311#comment-1354...