Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Baby clean-up step for #1541298: Remove Node module dependency from Testing profile
Problem
- Many test modules are using the 'access content' permission for their routes, even though they have nothing to do with Node module.
Proposed solution
- Replace all
_permission: 'access content'
with_access: TRUE
in test module routes. - Do not introduce new ones. ;)
Comment | File | Size | Author |
---|---|---|---|
#16 | 2177093.16.patch | 19.94 KB | alexpott |
#16 | 14-16--interdiff.txt | 570 bytes | alexpott |
Comments
Comment #1
sun_access: true
yields→ only
_access: 'TRUE'
works.Ugh.
Comment #3
dawehnerShouldn't we also remove the "access content" permission from created users in tests? This would be certainly harder to find them all.
Comment #4
BerdirThose tests rely on the fact that testing profile grants that permission to the anon and authenticated user role, so they all have it by default, just like the standard profile used to.
Comment #5
sunRemoving the permission assignments remains to be done for #1541298: Remove Node module dependency from Testing profile
For this issue here, I just want to get rid of access permission requirement in all test module routes, because that makes up ~60% of the patch in #1541298.
The earlier this gets in, the smaller is the chance that someone will copy/paste an existing test module route with this permission. Historically, that copy/pasting behavior is the root cause for why we have all these bogus access requirements.
Comment #6
XanoI confirmed that this patch only removes the access checks from routes that belong to testing modules, and that
testing_install()
indeed grants the removed permission to anonymous and authenticated users, as @Berdir said in #4.Comment #7
sun1: drupal8.test-route-access.1.patch queued for re-testing.
Comment #9
XanoRe-roll.
Comment #10
sunComment #11
dawehnerback to rtbc
Comment #12
sun9: drupal_2177093_9.patch queued for re-testing.
Comment #14
InternetDevels CreditAttribution: InternetDevels commentedAdded new patch.
Comment #16
alexpottFix the remaining test failures.
Comment #17
alexpottComment #18
sunComment #19
webchickCommitted and pushed to 8.x. Thanks!