- Issue created by @trackleft2
- πΊπΈUnited States trackleft2 Tucson, AZ πΊπΈ
Duplicate of π¬ Granular permissions are not working as expected. Active
While preparing the 4.0.22 release, I noticed that the environment-specific switcher permissions (e.g. "See environment indicator for 'Development'") were not functioning as expected. I tested both the current dev branch and version 4.0.21, and confirmed the issue exists in both.
Users granted a specific switcher permission are not shown the corresponding switcher in the toolbar. Only granting the "See all environment switchers" permission causes switchers to appear, regardless of the specific permissions set.
Configuration setup via Drush:
# Set the default indicator. drush config:set environment_indicator.indicator fg_color '#000000' -y drush config:set environment_indicator.indicator bg_color '#dd3f8f' -y drush config:set environment_indicator.indicator name 'Local' -y # Set up three switchers. drush config:set environment_indicator.switcher.dev machine 'dev' -y drush config:set environment_indicator.switcher.dev uuid '971430b9-85ed-4fb7-8ef1-0fae13bd3032' -y drush config:set environment_indicator.switcher.dev name 'Development' -y drush config:set environment_indicator.switcher.dev url 'https://dev.example.com' -y drush config:set environment_indicator.switcher.dev fg_color '#31758e' -y drush config:set environment_indicator.switcher.dev bg_color '#d4e5eb' -y drush config:set environment_indicator.switcher.dev weight 0 -y drush config:set environment_indicator.switcher.dev langcode 'en' -y drush config:set environment_indicator.switcher.dev status true -y drush config:set environment_indicator.switcher.staging machine 'staging' -y drush config:set environment_indicator.switcher.staging uuid '971430b9-85ed-4fb7-9ef1-0fae13bd3032' -y drush config:set environment_indicator.switcher.staging name 'Staging' -y drush config:set environment_indicator.switcher.staging url 'https://staging.example.com' -y drush config:set environment_indicator.switcher.staging fg_color '#017bff' -y drush config:set environment_indicator.switcher.staging bg_color '#ff94fb' -y drush config:set environment_indicator.switcher.staging weight 1 -y drush config:set environment_indicator.switcher.staging langcode 'en' -y drush config:set environment_indicator.switcher.staging status true -y drush config:set environment_indicator.switcher.prod machine 'prod' -y drush config:set environment_indicator.switcher.prod uuid '971430b9-85ed-5yb7-8ef1-0fae13bd3032' -y drush config:set environment_indicator.switcher.prod name 'Production' -y drush config:set environment_indicator.switcher.prod url 'https://example.com' -y drush config:set environment_indicator.switcher.prod fg_color '#000000' -y drush config:set environment_indicator.switcher.prod bg_color '#3dff24' -y drush config:set environment_indicator.switcher.prod weight 2 -y drush config:set environment_indicator.switcher.prod langcode 'en' -y drush config:set environment_indicator.switcher.prod status true -y
Steps:
environment_indicator
and environment_indicator_ui
.See environment indicator for "Development"
.The current logic does not honor the per-switcher permissions. Either:
None expected unless permissions are removed.
None unless access checking APIs are adjusted or deprecated.
None.
Active
4.0
User interface
Duplicate of π¬ Granular permissions are not working as expected. Active