Problem/Motivation

Since the toolbar integration was added, if it is active, users without access to the toolbar can't see the environment indicator.

Steps to reproduce

- Install the Environment Indicator and the Environment Indicator - Toolbar Integration modules.
- As a anonymous user or a user without toolbar access, the environment indicator doesn't appear.

Proposed resolution

In the hook_page_top() of the environment_indicator.module file, when checking if the toolbar integration exists to do an early return if it exists and don't render the indicator on the top of the page, also check if the current user has access to the toolbar.

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:

    1 hidden branch
  • 4.0.x Comparechanges, plain diff MR !139

Comments

daniab24 created an issue. See original summary.

kerasai’s picture

Hadn't come across this issue before posting my own. See #3594460: Toolbar Integration Broken for additional information.

kerasai’s picture

Quick review of the MR, that looks like the change I was envisioning. My only thought it to maybe look into the toolbar module itself to ensure that it's visibility depends on that permission and no other conditions.

kerasai’s picture

One last note, 4.0 works as expected if you uninstall the environment_indicator_toolbar module and utilize the deprecated "Toolbar integration" option. The 4.1 RC loses this functionality, though.

hanoii’s picture

Version: 4.0.x-dev » 4.1.0-rc1
Assigned: daniab24 » Unassigned
Status: Active » Fixed

I was working on fixing this and then saw these issues, I combined part of this MR with some of my work, which was an identical fix but this MR pointed to to another place I haven't seen. I won't backport this to 4.0. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • hanoii committed e5c6dd1e on 4.x
    fix: #3542383 Users without toolbar access can't see the environment...

  • hanoii committed e5c6dd1e on 5.0.x
    fix: #3542383 Users without toolbar access can't see the environment...

Status: Fixed » Closed (fixed)

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