The Finance Data Catalogue enables users to discover data holdings at the BC Ministry of Finance and offers information and functionality that benefits consumers of data for business purposes. The product is built using Drupal and adheres to the Government of BC's Core Administrative and Descriptive etadata Standard.
Other
6
stars
0
forks
source link
Tweak Environment Indicator to work the way we like it #496
This makes it difficult to restrict items in the Environment Switcher. It is a nice-to-have that I was trying to get for us, but it is not critical... and, I the module's maintainer seems to be working (slowly) on a solution for this, so maybe we can just wait for it.
But here is the change I'd like to make on the site for now:
Anyone logged in on Dev or Test should see the "switcher" -- a great convenience, to switch to the same page you are currently viewing, but on one of the other servers:
First you click on the machine name of the server:
Then, you click on another server to be taken to the same page (in this case, "People") on one of those servers:
Anyone on PROD, should not see the switcher.
Anyone on PROD should not even see the Environment Indicator colour-bar (which they currently don't), EXCEPT for:
Developers, for whom it is nice to get a reminder that we are on the live server!
As such, I'm going to use the Config Split module (which OpenPlus set up) to have different permissions on the Prod server: It will only turn on Environment Indicator for "Administrator" users (basically, site developers: Chris and me). All other users on Prod won't see it (as they currently do not).
And of course, I'll add the extra config needed to activate the "Environment Switcher" links, which I mentioned above.
This will make the site function equivalently to how our other Drupal sites are working. Eventually, I would still like to refactor this into the base build.
There is a bug in the Environment Switcher module: None of these permissions currently do anything:
(See this issue to follow its resolution.)
This makes it difficult to restrict items in the Environment Switcher. It is a nice-to-have that I was trying to get for us, but it is not critical... and, I the module's maintainer seems to be working (slowly) on a solution for this, so maybe we can just wait for it.
But here is the change I'd like to make on the site for now:
As such, I'm going to use the Config Split module (which OpenPlus set up) to have different permissions on the Prod server: It will only turn on Environment Indicator for "Administrator" users (basically, site developers: Chris and me). All other users on Prod won't see it (as they currently do not).
And of course, I'll add the extra config needed to activate the "Environment Switcher" links, which I mentioned above.
This will make the site function equivalently to how our other Drupal sites are working. Eventually, I would still like to refactor this into the base build.