Restrictions, Validation & Permissions
What an editor is allowed to place into a given cell of a Grid Element, or into a given column of a page, is decided by four separate layers. They are easy to conflate because they operate on the same underlying configuration, but they run at different times, for different reasons, and a bypass at one layer does not imply a bypass at another.
Structural restrictions
Each cell of a grid layout (page-level Backend Layout or Grid Element
layout) can carry allowed, disallowed and maxitems
configuration, defined in the layout's TSconfig (see the Grid TS
Syntax reference). allowed/disallowed apply by default to
CType, list_ and tx_.
list_ applies on TYPO3 13 only and is deprecated since 13.4.
TYPO3 14 removed the field; plugins are restricted through their
own CType instead.
Server-side validation also automatically includes any further field
mentioned by a column's own allowed or disallowed
configuration, so project-specific fields can be protected without
changing the restriction format. maxitems caps how many elements a
cell accepts.
The column restrictions are used both to filter the normal authoring
UI and to validate persisted changes server side. top_
is a separate layout-level nesting restriction whose enforcement path
differs, as described below.
On TYPO3 14, TYPO3 Core also reads column restrictions of page-level
Backend Layouts: its own allowed and
disallowed keys and, mapped to those, the
allowed./disallowed. syntax shown above. Core has no
maxitems and does not read Grid Element layouts. Grid Elements
does not read Core's allowed/disallowed
keys; its own filtering and checks use the allowed/disallowed
syntax. TYPO3 13 has none of these Core keys.
This configuration is the shared input to both layers below: what gets offered to an editor, and what actually gets accepted.
Authoring-time filtering (UI layer)
Several components filter what an editor sees, based on the restrictions above:
- Grid Element layout options offered in the New Content Element
Wizard are filtered through
Layout.Setup:: get Layout Wizard Items () Modify, a PSR-14 listener on Core'sNew Content Element Wizard Items Listener Modify, filters the wizard's full item list of content element types and plugins, resolving the target column's restrictions either from the page's own backend layout or from the target grid container's layout, depending on where the wizard was opened.New Content Element Wizard Items Event - The corresponding FormEngine select fields (
col,Pos CTypeand, on TYPO3 13,list_) usetype itemsimplementations that apply the same filtering to their item lists.Proc Func - On TYPO3 14, TYPO3 Core additionally filters the New Content Element
Wizard and the
CTypeandcolselect fields itself for page-level Backend Layout columns, using that column configuration including thePos CTyperules Grid Elements merges into it, see Extension Points.
This layer determines what is convenient to pick, not what is
permitted. The listener above reads its restriction data
(allowed/disallowed) directly from request query parameters,
which means any authenticated backend user can construct a request
that offers different values than the wizard would. UI filtering alone
would not be a security boundary.
Server-side enforcement
The same restrictions are enforced again, server side, independent of
what the UI offered. Classes/ implements
process and process,
backed by Classes/:
processchecks normalDatamap_ before Start () tt_datamap saves and resolves the effective target column, either the container's own layout andcontent tx_, or the target page's Backend Layout andgridelements_ columns col. It rejects the save if any restricted field's value is disallowed, or if the column'sPos maxitemswould be exceeded.processruns the equivalent check for copy and move commands (drag-and-drop, cut/paste, paste), resolving the same restrictions for the destination the command targets.Cmdmap_ before Start () top_is handled separately for copy and move operations that would place an existing Grid Element inside another container. It is not part of the genericlevel_ layout allowed/disallowed/maxitemsfield-validation loop.
On TYPO3 14, the CType restriction of a page-level column is
delegated to TYPO3 Core's Data,
with Grid Elements' rules merged into Core's column configuration.
The remaining field checks, maxitems and restrictions inside Grid
Element cells remain with the Grid Elements hooks described above.
maxitems enforcement counts existing siblings in the exact target
scope (container and column, or page and column, per language) and
also accounts for other records being saved in the same request, so
several new elements created together cannot collectively exceed the
limit even though none of them exists in the database yet.
A rejected save or command is not applied: the offending entry is
excluded before it is stored or executed. Grid Elements' hooks enqueue
a flash message explaining why. On TYPO3 14, a page-column CType
rejection is logged by TYPO3 Core's DataHandler hook; backend
controllers that display DataHandler errors turn it into a message.
This makes allowed/disallowed/maxitems
a real constraint on what ends up stored, not
merely a convenience for what the wizard suggests. This document makes
no claim about enforcement behavior in other maintained branches.
Permissions and auth mode
The layers above decide what is allowed in a particular cell. A
separate, TYPO3 Core mechanism decides whether a given backend user may
use a particular CType at all: explicit-allow/deny auth mode,
checked via Backend and
configured per backend user or group, the same mechanism Core uses for
any other restricted field value.
Grid Elements gates two of its own features behind this check rather than inventing a separate permission system:
Modifyonly runs at all if the current user's permissions allow theNew Content Element Wizard Items Listener gridelements_pi1 CType. A user without that permission does not see the Grid Elements branch of the wizard.- The "Paste as Reference" context menu action only renders if the
user's permissions allow the
shortcutCType(Item), since creating a reference means creating aProvider:: can Render () shortcutrecord.
Summary
| Layer | Decides | Enforced by |
|---|---|---|
| Structural restrictions | What a layout's top_ setting and a column's
allowed/disallowed/maxitems configuration say | Layout TSconfig, typically authored through the Grid Wizard, the shared input to both layers below |
| Authoring-time filtering | What is offered to an editor | Wizard item listener, items implementations; on
TYPO3 14, for page-level columns, also Core's wizard and
FormEngine filtering |
| Server-side enforcement | What is actually accepted and stored | Data before hooks, Restriction; on
TYPO3 14, Core's Data
for page-column CType |
| Permissions / auth mode | Whether a user may use a given CType at all | TYPO3 Core check |