Problem/Motivation

Not quite sure if this is a feature, bug or task :)

The preferred admin language feature currently requires users to have the 'access administration pages' permission. We'd like to use this also for regular editors that are basically just managing content.

Proposed resolution

Use a different permission, either a new one (possibly additional to the existing check for BC) or maybe use "view the administration theme" for this instead.

Remaining tasks

User interface changes

Users with "access administration theme" can now chose their preferred admin language.

API changes

Data model changes

Comments

Berdir created an issue. See original summary.

johnchque’s picture

Status: Active » Needs review
StatusFileSize
new983 bytes

Switching permission. Let's see if this breaks something.

Status: Needs review » Needs work
berdir’s picture

So just two failing tests.

We could keep support for the existing permission and then also test that it works with the new one?

johnchque’s picture

Status: Needs work » Needs review
StatusFileSize
new2.02 KB
new1.84 KB

Hmm forgot to update here, thanks @Berdir! Adding a check for having one of the two permissions. :)

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

mbovan’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Changing the status to "Needs work" to add tests for view the administration theme permission too.

mbovan’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new3.98 KB
new1.95 KB

Extending the tests coverage with view the administration theme permission.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

IMHO this is ready. I think it makes to have this in sync with the admin theme, if you see that then you can also use the admin language setting. Admin theme == admin language. Might result in this option showing up in the profile for users that didn't see it before on sites that use this feature but that seems OK?

Not sure if it's worth to have a change record for it for site builders?

Disclaimer: I didn't write the patch but basically said what it should do, and both @mbovan and @yongt9412 work/worked with me. But it's pretty straight forward and needs a decision whether or not this is something we want to do.

alexpott’s picture

Issue summary: View changes

It does almost feel like a bug. It definitely feels okay for users to get the option if the can view the admin theme. +1 to the approach taken and it is great to see test coverage.

I thought about adding a CR here but there's nothing for a site admin to do - users will now get an option they didn't have but there's nothing anyone needs to do as a result of this change.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 8466fbc982 to 9.0.x and 6db3447f1d to 8.9.x. Thanks!

  • alexpott committed 8466fbc on 9.0.x
    Issue #3007288 by yongt9412, mbovan, Berdir:...

  • alexpott committed 6db3447 on 8.9.x
    Issue #3007288 by yongt9412, mbovan, Berdir:...

Status: Fixed » Closed (fixed)

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