Fix broken permission for tt_content

The actual registry needs to be within ext_tables.php after loading TCA.

Resolves: #11480
This commit is contained in:
Daniel Siepmann (Codappix) 2024-11-04 15:35:47 +01:00
parent f6b153116d
commit d323a60e7a
SSH key fingerprint: SHA256:nAjx3Dpp8kuAC+S7QXj8BWmqw+KI1Miu+5e40BP3LXA
3 changed files with 17 additions and 4 deletions

View file

@ -44,11 +44,16 @@ class Extension
return 'LLL:EXT:' . self::EXTENSION_KEY . '/Resources/Private/Language/';
}
public static function registerConfig(): void
public static function registerExtLocalconfConfigConfig(): void
{
self::addCaching();
self::addContentElements();
self::addPageTypes();
self::addPageTypesExtLocalconf();
}
public static function registerExtTablesConfig(): void
{
self::addPageTypesExtTables();
}
public static function getIconPath(): string
@ -81,7 +86,7 @@ class Extension
}
}
private static function addPageTypes(): void
private static function addPageTypesExtTables(): void
{
$registry = GeneralUtility::makeInstance(PageDoktypeRegistry::class);
$registry->add(
@ -91,7 +96,10 @@ class Extension
'allowedTables' => '*',
]
);
}
private static function addPageTypesExtLocalconf(): void
{
// TODO: typo3/cms-core:14.0 Remove this code block as Configuration/user.tsconfig will be loaded since 13.x
if (version_compare(GeneralUtility::makeInstance(Typo3Version::class)->__toString(), '13.0', '<')) {
ExtensionManagementUtility::addUserTSConfig(

View file

@ -8,7 +8,7 @@ use WerkraumMedia\ThueCat\Extension;
defined('TYPO3') or die();
Extension::registerConfig();
Extension::registerExtLocalconfConfigConfig();
(static function (string $extensionKey) {
ExtensionManagementUtility::addTypoScriptSetup(

5
ext_tables.php Normal file
View file

@ -0,0 +1,5 @@
<?php
use WerkraumMedia\ThueCat\Extension;
Extension::registerExtTablesConfig();