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
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | interdiff-3007288-9-5.txt | 1.95 KB | mbovan |
| #9 | 3007288-9.patch | 3.98 KB | mbovan |
| #5 | interdiff-3007288-2-5.txt | 1.84 KB | johnchque |
| #5 | LanguageNegotiationUserAdmin_requires-3007288-5.patch | 2.02 KB | johnchque |
| #2 | LanguageNegotiationUserAdmin_requires-3007288-2.patch | 983 bytes | johnchque |
Comments
Comment #2
johnchqueSwitching permission. Let's see if this breaks something.
Comment #4
berdirSo just two failing tests.
We could keep support for the existing permission and then also test that it works with the new one?
Comment #5
johnchqueHmm forgot to update here, thanks @Berdir! Adding a check for having one of the two permissions. :)
Comment #8
mbovan commentedChanging the status to "Needs work" to add tests for
view the administration themepermission too.Comment #9
mbovan commentedExtending the tests coverage with
view the administration themepermission.Comment #10
berdirIMHO 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.
Comment #11
alexpottIt 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.
Comment #12
alexpottCommitted and pushed 8466fbc982 to 9.0.x and 6db3447f1d to 8.9.x. Thanks!