Review main Ready for review

97584[TASK] Avoid repeated page access checks for inline children

Benni Mack CR +1 V +1 Normal +188 −23 updated 11/13/26, 19:10

Commit message

When rendering the header controls of an inline child or a file
reference, FormEngine called BackendUtility::readPageAccess() for
the parent page of each child. All children of a record usually
live on the same page, so the same page record was fetched and
evaluated once per child, which adds up for records with many
inline relations.

The permissions of the page a child is located on are already
determined by the form data provider DatabaseUserPermissionCheck
and are available as "userPermissionOnPage". The containers now
use this value instead of calculating the permissions again.

This also covers records on the root level: the data provider
grants full access for tables which ignore the root level
restriction, so the special handling added to the file reference
container with #99516 is not needed anymore.

As a consequence, editors now see all controls (new, sort, hide,
delete) of inline children on the root level of any table which
ignores the root level restriction, not only for file references.
Previously these controls were hidden, although the DataHandler
already allowed editors to execute these actions.

Inline children of the table "pages" keep the existing lookups,
as their "userPermissionOnPage" describes the page itself and
not its parent page.

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 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/84/97584/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/84/97584/2 && git cherry-pick FETCH_HEAD

Review

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

Merge conflicts 5

Issues 1

Files 5

Review log 57

  1. Benni Mack uploaded patch set 1 11/12/26, 18:50

  2. core-ci voted on patch set 1 V +1 11/12/26, 18:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114210

  3. Oli Bartsch commented on patch set 1 11/13/26, 16:16

    InlineRecordContainer.php:376

    Non-admins now get the full set of controls (new/sort/delete/hide) for pid-0 children of `ignoreRootLevelRestriction` tables, because `DatabaseUserPermissionCheck` sets `Permission::ALL`. This matches DataHandler, so it looks like a fix, but it is a user-visible change for many tables beyond file references. Sugest to either mention it in the commit message and add a test for it.
  4. Benni Mack uploaded patch set 2 V +1 11/13/26, 17:23

  5. Benni Mack commented on patch set 1 11/13/26, 17:48

    InlineRecordContainer.php:376 Reply

    Done in PS2: the commit message now mentions it, and `InlineRecordContainerTest` has a test for a root-level child as an editor (it fails without the patch).
  6. Simon Schaufelberger voted on patch set 2 CR +1 V +1 11/13/26, 18:31

  7. core-ci voted on patch set 2 V +1 11/13/26, 19:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114364