Skip to content

Commit

Permalink
[Backport 12.4] [BUGFIX] Correct examples for $GLOBALS['TCA'][$table]…
Browse files Browse the repository at this point in the history
…['ctrl']['security'] (#719)

[BUGFIX] Correct examples for $GLOBALS['TCA'][$table]['ctrl']['security']

The Configuration/TCA/<table>.php files return an array with the TCA definition.
Therefore, the examples should reflect this.

Releases: main, 12.4, 11.5

Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and brotkrueml committed Jun 9, 2023
1 parent 552d7db commit d88d642
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Documentation/Ctrl/Properties/Security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ security
:Scope: Display


Array of sub-properties. This is used in the Core for the :sql:`sys_file` table:
Array of sub-properties. This is used, for example, in the Core for the
:sql:`sys_file` table:

.. code-block:: php
:caption: EXT:core/Configuration/TCA/sys_file.php
$GLOBALS['TCA']['sys_file'] = [
return [
'ctrl' => [
// ...
'security' => [
'ignoreWebMountRestriction' => true,
'ignoreRootLevelRestriction' => true,
Expand All @@ -36,15 +38,24 @@ security
.. code-block:: php
:caption: EXT:sys_note/Configuration/TCA/sys_note.php
$GLOBALS['TCA']['sys_note'] = [
return [
'ctrl' => [
// ...
'security' => [
'ignorePageTypeRestriction' => true,
],
// ...
],
];
You can also use it in an override file:

.. code-block:: php
:caption: EXT:my_extension/Configuration/TCA/Overrides/my_table.php
$GLOBALS['TCA']['my_table']['ctrl']['security']['ignoreWebMountRestriction'] = true;
$GLOBALS['TCA']['my_table']['ctrl']['security']['ignoreRootLevelRestriction'] = true;
$GLOBALS['TCA']['my_table']['ctrl']['security']['ignorePageTypeRestriction'] = true;
ignoreWebMountRestriction
Allows users to access records that are not in their defined web-mount,
Expand Down

0 comments on commit d88d642

Please sign in to comment.