Problem/Motivation

While testing with a limited access user (eg. Author role in demo_umami), we noticed in the navigation side bar that we show icons for links that the user is not allowed to see, but the link and text is hidden.

Steps to reproduce

  • Install the navigation module
  • Login as a limited access, non-admin user, eg. Author role from demo_umami
  • Notice the navigation sidebar is broken looking

Proposed resolution

For users without access to items in the navigation bar, those items should not display at all. From a markup perspective, there should be no <li> at all for the item.

Remaining tasks

Implementation.

User interface changes

Fix broken UI for limited access users.

API changes

None.

Data model changes

None.

Issue fork navigation-3413786

Command icon 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

m4olivei created an issue. See original summary.

kostyashupenko made their first commit to this issue’s fork.

kostyashupenko’s picture

Status: Active » Needs review
m4olivei’s picture

Status: Needs review » Needs work

I fixed the merge conflicts from #3411099: Create an administration UI for managing Navigation Blocks getting merged.

Found one small issue with the MR, otherwise looking good!

kostyashupenko’s picture

Status: Needs work » Needs review
m4olivei’s picture

Issue summary: View changes
m4olivei’s picture

Thanks for the changes! Those look good, we can resolve all those threads (I can't, but you should be able to as the MR owner).

I found one more thing that isn't strictly related to this issue, but is closely related and along the same lines. Even when the AdminNavigationBlock is empty, the wrapper markup from navigation-block.html.twig is still showing up. See screenshot below. Can we fix this as well, or otherwise file a followup?

kostyashupenko’s picture

Status: Needs work » Needs review
m4olivei’s picture

Status: Needs review » Reviewed & tested by the community

Looks great! Thanks for all the changes. RTBC for me.

ckrina’s picture

Fixed! Thanks both!

ckrina’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.