Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Quiet

96664[TASK] Resolve page and record references

Oli Bartsch CR 0 V 0 Expert +1652 −12 updated 10/19/26, 07:43

Commit message

A capability that works on a page or a record must not trust the uid a
caller sends, and must not decide on its own whether the user may read
or edit it.

A capability parameter can now be a PageReference or a RecordReference,
also nullable or as a list. Its #[Param] names the table of a record
and the access it needs, Read by default. A capability that changes
data has to state the access of every reference. The argument schema
describes a reference as a uid, and hydration only checks that the uid
is positive.

After the gates and the arguments, prepare() resolves every reference
for the user. Reading follows the RecordReadAccessCheck and, for
records, the language access of the user: as the record list and the
page module hide them, records of a language the user may not access
are not found, while records for all languages are readable. The new
LanguageAccessCheck decides this with the semantics of
checkLanguageAccess() and offers a matching query restriction for
lists. Pages are not restricted by language, as only pages in the
default language are resolved. The uid of a live record and of its
version in the current workspace both refer to the live record, which
the capability receives as the current workspace shows it. Records of
other workspaces, deleted records, records deleted in the current
workspace and translated pages are not found. Editing additionally
needs "tables_modify", the editing stage or live editing in a
workspace, the page permission DataHandler evaluates, and the record
internals that checkRecordEditAccess() evaluates, such as editlock and
explicitly allowed values. As in DataHandler, editing is checked on the
stored record and its page, also when a workspace moves it. A missing
or unreadable reference is not found, also a record of another
language that is to be edited, and a readable one the user may not
edit is not permitted. The failure names its argument. DataHandler
stays the authority when data is written.

References to files and languages follow separately.

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

Review

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

Relation chain 5

  1. main 96852[TASK] Add check whether a user may read a field Based on this change Merge conflict Oli Bartsch CR 0 V 0 Hard +320 −3

    The chain has patch set 1 of 2, the changes above it need a rebase.

  2. 96664 [TASK] Resolve page and record references This change

  3. main 96661[TASK] Add capability invoker and registry This change is based on it Work in progress Merge conflict Oli Bartsch CR 0 V 0 Expert +2379 −0
  4. main 96660[TASK] Derive argument schemas from signatures This change is based on it Work in progress Merge conflict Oli Bartsch CR 0 V 0 Expert +1995 −1
  5. main 96580[TASK] Add check whether a user may read a record This change is based on it Merge conflict Oli Bartsch CR 0 V 0 Expert +1773 −28

    The chain has patch set 3 of 4, the changes above it need a rebase.

Issues 1

Files 30

Show 10 more files

Review log 47

  1. Oli Bartsch uploaded patch set 1 10/13/26, 08:51

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

  3. Oli Bartsch rebased onto patch set 2 V +1 10/14/26, 06:42

  4. core-ci voted on patch set 2 V +1 10/14/26, 06:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111045

  5. Benni Mack commented on patch set 2 10/18/26, 17:55

    Access.php:29 Unresolved

    There is only Read and Edit. A delete capability passes with Edit, although DataHandler requires delete permission on the page. The same goes for create (PAGE_NEW), move and translate. Should Access mirror the actions DataHandler distinguishes instead ? Should we do this first in DataHandler?
  6. Oli Bartsch uploaded patch set 3 V +1 10/19/26, 07:27

  7. core-ci voted on patch set 3 V +1 10/19/26, 07:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111590