Attached patch adds a Context Reaction plugin for Environment Indicator. In any given Context, you can declare that the EI module should be activated, and configure it, using the site-wide configuration as defaults.

It will only show itself if the site-wide configuration is disabled, and only the first context (somewhat arbitrary) to declare an Environment Indicator reaction will actually control what happens.

In a short time I will also be bringing a Content Condition plugin to the Environment module. This combination will enable environment indicators in the sidebar to be linked to different environment/deployment states, and all will be packagable in a Feature.

CommentFileSizeAuthor
environment_indicator.context.patch7.61 KBGrayside
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mrfelton’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Active

This looks pretty nice. New features are going into the D7 branch first though, so need to get a patch for that version first.

Grayside’s picture

I'm not currently using the Environment Indicator module so it's unlikely I'll have the time for a reroll any time soon.

Leeteq’s picture

Issue summary: View changes

Is this what is needed to tie the environment switcher to the user role?

If I understand the permissions and settings correctly, the "environment" is related to the path and possibly "realm" if setting up through the variables module, however still regardless of which roles can see which environment?

The variables module integration does not seem to provide any way to say "if current user is member of role x, then use the color settings of environment y", or am I missing something in the existing settings?

e0ipso’s picture

@Leeteq I don't think it's in the module's roadmap to provide color schemes per environment and per user role.

Leeteq’s picture

@e0ipso; thanks for the feedback.
I created feature request for this here:
#2282087: for role x, use environment y