Navigation Top Bar hides entity local tasks even if the user has no access to the bar

Created on 2 May 2024, about 2 months ago
Updated 7 May 2024, about 2 months ago

Problem/Motivation

When experimental navigation top bar module is enabled and user has access to the top bar, entity local tasks like "Edit" or "Translate" are removed from the tabs section and moved to a dropdown in the top bar.

This works nicely for users with access to the top bar.

However, access to top bar is not properly checked and users with no access to the navigation are missing the tabs and the top bar, making the administrative experience very poor.

Screenshot for admin user with access to navigation:

Screenshot for editor user with no access to navigation:

Steps to reproduce

  • Install a vanilla Drupal site and enable navigation and navigation_top bar module. Disable toolbar.
  • Create 2 users, both of them with access to modify any content, but only one of them with access navigation permission
  • Login as navigation available user and visit a node edit page
  • Confirm that tabs are gone and node actions have been moved to the top bar
  • Login as non-administrative user and visit a node edit page
  • Confirm that tabs are gone and top bar is not present, making the admin experience much worse

Proposed resolution

Check for access to navigation before hiding tasks

Remaining tasks

  • Improve logic to hide tabs if only the user has access to navigation in NavigationRenderer::removeLocalTasks()
  • Update NavigationTopBarTest to confirm the bug is fixed

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
NavigationΒ  β†’

Last updated about 18 hours ago

No maintainer
Created by

πŸ‡ͺπŸ‡ΈSpain plopesc Valladolid

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

Comments & Activities

Production build 0.69.0 2024