Problem/Motivation

It should be possible to not show the current release info to everyone with access to the environment indicator.
So the module should provide a permission to manage this.

Proposed resolution

Provide a new permission to manage the visibility of the current release.

Remaining tasks

Provide patch.
Review patch.

User interface changes

-

API changes

-

Data model changes

New permission to manage the visibility to the current release info.

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

tim-diels created an issue. See original summary.

tim-diels’s picture

Status: Active » Needs review

Provided merge request. Can someone please review?

tim-diels’s picture

Assigned: tim-diels » Unassigned
e0ipso’s picture

Thanks 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.

tim-diels’s picture

Our 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.

bstan’s picture

Can this patch be updated to reflect the latest change to how the environment indicator title is rendered?

tim-diels’s picture

@bstan I’m not following. This patch only adds a permission…

bkosborne’s picture

+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

tim-diels’s picture

Rebased.

tim-diels’s picture

@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...

bkosborne’s picture

@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.

tim-diels’s picture

Ok 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.

bkosborne’s picture

Yes, I think doing both makes sense for sure!

joachim’s picture

Another 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.

trackleft2’s picture

Unless 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.

trackleft2’s picture

trackleft2 changed the visibility of the branch 3310409-add-permission-to to hidden.

trackleft2 changed the visibility of the branch 4.x to hidden.

trackleft2’s picture

This 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.

trackleft2’s picture

I was finally able to get all the tests to pass.

  • trackleft2 committed 86991615 on 4.x
    Issue #3310409 by trackleft2, tim-diels, bkosborne, e0ipso, bstan,...
trackleft2’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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