Follow-up for #1754246: Languages should be configuration entities
Problem/Motivation
Languages now configuration objects so their routers used own accessChecks
Proposed resolution
Implement all needed methods of LanguageAccessController for Language configurable entity and use it for all access checks on routes
Related Issues
#1946426: Convert all of confirm_form() in language.admin.inc to the new form interface
#2003592: Convert language_admin_add_form and language_admin_edit_form to a Controllers
#2005778: Convert language_admin_overview_form to a Controller
Comment | File | Size | Author |
---|---|---|---|
#11 | 2031277-11.patch | 680 bytes | andypost |
#1 | 2031277-language-access-controller-1.patch | 1.92 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Initial patch....
Comment #2
vijaycs85may need to close as this part covered in #2005778: Convert language_admin_overview_form to a Controller ?
Comment #3
andypostWe need list operation implementation so suppose better to make whole feature in #2005778: Convert language_admin_overview_form to a Controller
Let's use the issue to test patches to implement access controller with unittest
NW for
return !$entity->locked && user_access('adminster languages')
Comment #4
vijaycs85:D @andypost that's what happen when blindly convert ;) Thanks for the review. I have updated the overview page issue with your review comment in #3
Comment #5
vijaycs85Comment #6
YesCT CreditAttribution: YesCT commentedCan we add an @see to the class (or something) where we define what locked is?
I remember it's the undefined and not applicable, but would be good to have a reference here, so we know why we do not allow editing or deleting those system (hidden) languages.
Comment #7
webflo CreditAttribution: webflo commentedPass $account to the user_access().
Comment #8
YesCT CreditAttribution: YesCT commentedActually, someone could just look up that property, so we might not want an @see
...
When I looked up the property, I found no docs. :)
So:
#2035007: Add docs for properties in Drupal\Core\Language\Language
Comment #9
penyaskito#2005778: Convert language_admin_overview_form to a Controller landed, and includes a LanguageAccessController. Should we close this one? Are there any more tests needed?
Comment #10
Gábor HojtsyLooks like already resolved to me(?)
Comment #11
andypostre-tile, because this method is needed for #2003592: Convert language_admin_add_form and language_admin_edit_form to a Controllers
Comment #12
andypostProbably we could close the issue and implement the method in #2003592-15: Convert language_admin_add_form and language_admin_edit_form to a Controllers because the one depends on it.
Comment #12.0
andypostUpdated issue summary.