Problem/Motivation
In #540008: Add a container parameter that can remove the special behavior of UID#1 an approach was taken where we can simply flag tests that are failing if we turn off user 1's super user powers, so that they can be taken care of in a followup. This issue is to collect all of these followups.
The goal is to have no tests in Drupal core that rely on UID1's special privileges so that we:
- Know these tests are correctly assigning the necessary permissions to run
- Can turn off the super user access policy in D11, knowing it won't break core
- Can remove the super user access policy in D12, providing an admin account recovery tool to replace it
Steps to reproduce
Go into any of the tests flagged with:
/**
* {@inheritdoc}
*
* @todo Remove and fix test to not rely on super user.
* @see https://www.drupal.org/project/drupal/issues/3437620
*/
And:
- Remove the code below that sets the usesSuperUserAccessPolicy to TRUE.
- Run the test to see which test methods are failing
Proposed resolution
Assign the right permissions to make the test go green without the super user access policy. Those few tests that specifically test said policy can obviously stay, but will be removed along with the policy in D12.
Remaining tasks
Fix #3515189: MigrateControllerTest requires root user, remove @todo
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
None
Comments
Comment #2
kristiaanvandeneyndeComment #3
kristiaanvandeneyndeComment #4
kristiaanvandeneyndePerhaps we can group the list in the IS by module/subsystem, updated as such. This leaves 27 issues to be created rather than 71.
Comment #5
smustgrave commentedPut in bold at the top of the issue summary any follow ups should be novice
Comment #6
vensiresComment #7
kristiaanvandeneyndeComment #8
vensiresI have created all the different issues described as children-issues of this meta.
Comment #9
kristiaanvandeneyndeAwesome, thanks! Updated the IS.
Comment #10
kristiaanvandeneyndeComment #11
kristiaanvandeneyndeUpdated IS to shorten list of remaining tasks.
Comment #12
andypostOnly 7 issues left in child-list
Comment #13
kristiaanvandeneyndeComment #14
kristiaanvandeneyndeWhoops, removed wrong one. Rectifying.
Comment #15
kristiaanvandeneyndeSorry for the noise, colors changed after I updated. Seems we're down to 6 now!
Comment #16
pooja_sharma commentedComment #17
pooja_sharma commentedComment #18
pooja_sharma commentedComment #19
quietone commentedOne left to look into
Comment #20
quietone commentedComment #21
kristiaanvandeneyndeDid you delete the MigrateControllerTest message by mistake?I think that's the final one to open a child issue for, but it's probably a bit more complex to fix as I recall it involves changing JavaScript.Edit: Never mind, found the one you created and will link it in the IS.
Comment #22
kristiaanvandeneyndeComment #23
kristiaanvandeneyndeComment #24
quietone commentedThe last child issue has been fixed.
A search,
return nothing, so all the instances have been fixed.
Thanks to everyone here for getting this done!
Comment #25
kristiaanvandeneynde🎉
Big thanks to everyone involved!