Review main Ready for review

98001[TASK] Resolve simulatable frontend groups in core

Matthias Vogel CR 0 V 0 Hard +201 −103 updated 11/25/26, 09:28

Commit message

The admin panel shows the frontend user groups that a backend user
may simulate. The rule for this list is in the admin panel class
FrontendGroupsRepository. The class reads the backend user from
$GLOBALS['BE_USER'] and gets the connection pool with
GeneralUtility::makeInstance(). Thus other code cannot use the rule
for a given backend user.

The new internal service SimulatableFrontendUserGroupsResolver in
EXT:core now contains the rule. It gets the backend user as an
argument and the connection pool through the constructor. The rule
stays the same: the list contains the groups on the pages that the
backend user has the permission Permission::PAGE_SHOW for, ordered by
title. One query replaces the count query and the select query,
because the result is the same.

The admin panel uses the new service. This change removes the
internal class FrontendGroupsRepository.

The preview of hidden pages across site domains (#110664) needs the same
rule for a given backend user.
Show more Show less

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/01/98001/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/01/98001/1 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 2

Issues 2

Files 7

Review log 12

  1. Matthias Vogel uploaded patch set 1 11/25/26, 09:09

  2. core-ci voted on patch set 1 V +1 11/25/26, 09:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115382