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.
Issue fork environment_indicator-3542383
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:
- 4.0.x
changes, plain diff MR !139
Comments
Comment #3
kerasai commentedHadn't come across this issue before posting my own. See #3594460: Toolbar Integration Broken for additional information.
Comment #4
kerasai commentedQuick 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.
Comment #5
kerasai commentedOne last note, 4.0 works as expected if you uninstall the
environment_indicator_toolbarmodule and utilize the deprecated "Toolbar integration" option. The 4.1 RC loses this functionality, though.Comment #6
hanoiiI 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!