Closed (fixed)
Project:
Environment Indicator
Version:
4.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2022 at 14:41 UTC
Updated:
6 Aug 2025 at 01:49 UTC
Jump to comment: Most recent
Comments
Comment #3
tim-dielsProvided merge request. Can someone please review?
Comment #4
tim-dielsComment #5
e0ipsoThanks again for the MR. What is the use case for this? This is the first time in many years that someone has asked for this feature.
Comment #6
tim-dielsOur use case is that we don’t want to show the release info to lower roles but do want the environment switcher available to these roles.
Comment #7
bstan commentedCan this patch be updated to reflect the latest change to how the environment indicator title is rendered?
Comment #8
tim-diels@bstan I’m not following. This patch only adds a permission…
Comment #9
bkosborne+1 to this. But actually, I'd also prefer if there were a way to disable this entirely. We give access to this environment switcher and toolbar to tons of people, but none of them care what the current release indicator is. They just use it for a way to switch between prod/test environments. This indicator confuses people. For now, I'm altering the render array to remove it
Comment #10
tim-dielsRebased.
Comment #11
tim-diels@bkosborne With this, you can disable the release info for users without the permission. Only the environment is still indicated what is in my eyes what you still need to be sure to know on what environment you are...
Comment #12
bkosborne@tim-diels the problem with making it permissions based for me is that there's a number of us in my office that are admins on all our sites, and since admins inherit ALL permissions, they'd still see it. That's why I think it would be better off as a feature flag.
Comment #13
tim-dielsOk I follow you, maybe we could do both? So disable it entirely or enable it and only view when you have the permission. What you think? IF we agree, I can easily add it.
Comment #14
bkosborneYes, I think doing both makes sense for sure!
Comment #15
joachim commentedAnother use case is that the release number is loaded from state, which means an extra query on every page load, even if you don't use this feature.
Comment #16
trackleft2Unless I am missing something, the ability to disable the deployment indicator in https://www.drupal.org/project/environment_indicator/issues/3324621 should partially resolve this issue without permissions.
Comment #17
trackleft2Comment #21
trackleft2This is ready for final review. Please be extra critical when reviewing the database update to ensure it behaves correctly across all roles and permission configurations.
Comment #22
trackleft2I was finally able to get all the tests to pass.
Comment #24
trackleft2