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

Review main Work in progress Quiet

96661[TASK] Add capability invoker and registry

Oli Bartsch CR 0 V 0 Expert +2379 −0 updated 10/19/26, 07:40

Commit message

APIs that let other systems call TYPO3 operations, such as an MCP
server, need one place that knows these operations, checks who may call
them and calls them with validated arguments, so that every channel
enforces the same rules.

The internal AsCapability attribute registers a public service method
as a capability with an id "<extension key>.<object>.<verb>", a
summary, a type from which its effect follows, and typed gates: table
access, a custom permission option, a gate class, or AnyUser, which
grants every backend user and has to be stated explicitly. Table access
follows DataHandler: tables restricted to admins need an admin, read
only tables cannot be modified. A public capability also needs a
description of itself and of every parameter and, unless it only reads,
a workspace mode. A capability that is invalid, including one whose
arguments yield no argument schema, fails the container build.

The CapabilityInvoker calls a capability in two phases, so that a
channel can apply its own policy in between. prepare() checks the gates
before the arguments and hydrates the arguments against the schema
derived from the signature. execute() calls the capability as the
global backend user the invocation was prepared for, and only once.
Both phases turn every unexpected exception into a logged internal
error with a neutral message. Failures carry an outcome category with
an HTTP status, an optional namespaced domain code and scalar domain
facts. Preparing a deprecated capability triggers a deprecation.

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 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/61/96661/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/61/96661/4 && 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. main 96664[TASK] Resolve page and record references Based on this change Work in progress Merge conflict Oli Bartsch CR 0 V 0 Expert +1652 −12
  3. 96661 [TASK] Add capability invoker and registry This change

  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 39

Show 19 more files

Review log 812

  1. Oli Bartsch uploaded patch set 1 10/13/26, 07:23

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

  3. Mathias Brodala commented on patch set 1 10/13/26, 07:38

    NoGate.php:21 Unresolved

    What is the implication? Would be PasstroughGate / PassGate / similar be clearer? No gate usually means that one cannot enter. ;-)
  4. Benjamin Franzke commented on patch set 1 10/13/26, 07:47

    I think we planned to encapsulate Actions (both HTTP and MCP) as actions, see > 91563: [WIP][FEATURE] Introduce Action API | https://review.typo3.org/c/Packages/TYPO3.CMS/+/91563 Can we join forces?
  5. Oli Bartsch marked it work in progress 10/13/26, 08:08

  6. Oli Bartsch rebased onto patch set 2 V +1 10/13/26, 08:51

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

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

  9. core-ci voted on patch set 3 V +1 10/14/26, 06:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111044

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

    Reply Unresolved

    CapabilityType has the same six cases as ActionType in 91563, and registry, invoker and attribute mirror the Action API. This could be merged = looks like you agreed on that part.
  11. Oli Bartsch uploaded patch set 4 V +1 10/19/26, 07:27

  12. core-ci voted on patch set 4 V +1 10/19/26, 07:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111589