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:

  1. Know these tests are correctly assigning the necessary permissions to run
  2. Can turn off the super user access policy in D11, knowing it won't break core
  3. 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:

  1. Remove the code below that sets the usesSuperUserAccessPolicy to TRUE.
  2. 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

  • core/modules/taxonomy/tests/src/
    • Kernel/Views/TaxonomyFieldVidTest.php

Issue fork drupal-3439909

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vensires created an issue. See original summary.

Vighneshh made their first commit to this issue’s fork.

pradhumanjain2311 made their first commit to this issue’s fork.

SolimanHarkas made their first commit to this issue’s fork.

solimanharkas’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Left a comment.

Saving credit for @vensires and opening all the tickets. Also @SolimanHarkas for starting the work

@Vighneshh and @pradhumanjain2311 not saving as there was no commit made

solimanharkas’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 0894355a79 to 11.x and ae9b755736 to 11.0.x and e1643718f3 to 10.4.x and 19eee98494 to 10.3.x. Thanks!

alexpott’s picture

  • alexpott committed 19eee984 on 10.3.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

  • alexpott committed e1643718 on 10.4.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

  • alexpott committed ae9b7557 on 11.0.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

  • alexpott committed 0894355a on 11.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

  • alexpott committed 19eee984 on 10.3.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

  • alexpott committed e1643718 on 10.4.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

  • alexpott committed ae9b7557 on 11.0.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

  • alexpott committed 0894355a on 11.x
    Issue #3439909 by SolimanHarkas, vensires: Fix Taxonomy tests that rely...

Status: Fixed » Closed (fixed)

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