Review main Merged

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

Benni Mack CR +2 V +2 Easy +44 −0 updated 10/02/26, 10:29

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
    • Georg Ringer +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Georg Ringer +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1012

  1. Benni Mack uploaded patch set 1 09/08/26, 14:05

  2. core-ci voted on patch set 1 V +1 09/08/26, 14:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108096

  3. Benni Mack marked it ready for review 09/08/26, 15:38

  4. Wouter Wolters voted on patch set 1 CR +1 V +1 09/08/26, 16:09

  5. Georg Ringer voted on patch set 1 CR +1 V +1 09/09/26, 15:12

  6. Benni Mack updated the commit message in patch set 2 CR +1 V +1 10/01/26, 21:25

  7. core-ci voted on patch set 2 V +1 10/01/26, 21:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109843

  8. Simon Schaufelberger voted on patch set 2 CR +1 V +1 10/02/26, 00:04

  9. Josef Glatz voted on patch set 2 V +1 10/02/26, 05:36

  10. Georg Ringer voted on patch set 2 CR +1 V +1 10/02/26, 10:26

  11. Benni Mack voted on patch set 2 CR +2 V +2 10/02/26, 10:28

  12. Benni Mack merged patch set 3 10/02/26, 10:29