
If Drupal's administration toolbar is still showing admin menu items to non-admin users, or are still displayed even if these non-admin users do not have the permissions to such administrative tasks, this article shows how to troubleshoot the issue.
Administration Toolbar module in Drupal
The administration menu toolbar (Admin Toolbar module) in Drupal (both available for Drupal 9/8 and Drupal 7) is a very good module you would want to use on top of the core Toolbar module for many advantages. It provides:
- an improved, default Toolbar (the administration menu at the top of your site) to transform it into a drop-down menu, providing convenient and fast access to all administration pages
- works on the top of the default toolbar core module and is, therefore, a light module and keeps all the toolbar functionalities (shortcut/media responsive)
Remove, disable or hide admin menu toolbar items from non-admin user roles
Most times, you would want the administration toolbar available only for certain non-admin roles and users. This is easily configured in the Permissions /admin/people/permissions settings where you only provide admin toolbar access to certain roles. You will normally and further configure it in such way that only certain administration features (and links to these) available accordingly - for instance: the sub-menu Content > Add Content > specific Content Item only visible and available to certain user roles.
However, there are instances when you find that these administration menu items are still available from the dropdown menu despite the Permission settings configured. If for some reason you have this issue, check that the Admin Toolbar Links Access Filter is enabled. This is a sub-module that comes with the AdminToolbar module in Drupal 8 and Drupal 9. Just enable it and the administration menus and sub-menus will now be displayed or disabled according to user permission roles.
Before without the Admin Toolbar Links Access Filter
(all admin toolbar sub-menus are available even if user does not have access to such features and administrative functions)
After Admin Toolbar Links Access Filter is enabled
(this time only the required and necessary admin menu items and functionalities are available according to user role permissions)
Leave a Comment