Review 14.3 Merged

95760[BUGFIX] Evaluate user TSconfig conditions against the current user

Benni Mack CR +2 V +2 Easy +46 −0 updated 09/11/26, 12:55

Commit message

User TSconfig conditions such as [backend.user.isAdmin] are evaluated
against the 'backend.user' aspect of the Context. That aspect was
still the empty default one while the conditions were parsed:
prepareUserTsConfig() runs inside fetchGroupData(), which is called
one line before initializeBackendLogin() refreshes the aspect.

Every backend.user condition in user TSconfig therefore saw an
anonymous user: an administrator matched the [!backend.user.isAdmin]
branch, and even [backend.user.isLoggedIn] never matched at all.

The aspect is now refreshed within fetchGroupData(), right before user
TSconfig is parsed. Group data is fully resolved at that point, so
userGroupList and userGroupIds are available to conditions as well.
The refresh in initializeBackendLogin() is kept: fetchGroupData()
returns early when no user is set.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 58

  1. Benni Mack commented on patch set 1 09/10/26, 12:08

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 09/10/26, 12:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108256

  3. Benni Mack commented on patch set 2 V -1 09/10/26, 12:45

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V -1 09/10/26, 12:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108263

  5. Benni Mack commented on patch set 3 V -1 09/10/26, 13:00

    Published edit on patch set 2.
  6. core-ci voted on patch set 3 V +1 09/10/26, 13:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108264

  7. Benni Mack voted on patch set 3 CR +2 V +2 09/11/26, 12:55

  8. Benni Mack merged patch set 4 09/11/26, 12:55