diff --git a/home/files/typo3-configuration/AdditionalConfiguration.inc.php b/home/files/typo3-configuration/AdditionalConfiguration.inc.php index 8ef008d..9dd3660 100644 --- a/home/files/typo3-configuration/AdditionalConfiguration.inc.php +++ b/home/files/typo3-configuration/AdditionalConfiguration.inc.php @@ -1,18 +1,24 @@ = 10.4 -if (class_exists(\TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::class) !== false) { - class AutoAuthenticationTypo3Service extends \TYPO3\CMS\Core\Authentication\AbstractAuthenticationService - { - public function getUser() - { - $possibleUsernames = [ - 'dsiepmann', - 'daniel.siepmann', - 'daniel_siepmann', - ]; - - foreach ($possibleUsernames as $username) { - $record = $this->fetchUserRecord($username); - if (is_array($record)) { - return $record; - } - } - - return []; - } - - public function authUser(array $user) - { - return 200; - } - } -} - -// < 10.4 -if (class_exists(\TYPO3\CMS\Sv\AbstractAuthenticationService\AbstractAuthenticationService::class) !== false) { - class AutoAuthenticationTypo3Service extends \TYPO3\CMS\Sv\AbstractAuthenticationService\AbstractAuthenticationService - { - public function getUser() - { - $possibleUsernames = [ - 'dsiepmann', - 'daniel.siepmann', - 'daniel_siepmann', - ]; - - foreach ($possibleUsernames as $username) { - $record = $this->fetchUserRecord($username); - if (is_array($record)) { - return $record; - } - } - - return []; - } - - public function authUser(array $user) - { - return 200; - } - } -} - -// Autologin if ( class_exists(\Codappix\CdxAutoLogin\AutoAuthenticationTypo3Service::class) && ($_COOKIE['das_prevent_login'] ?? false) == false @@ -73,7 +14,7 @@ if ( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService( 'sitepackage', 'auth', - AutoAuthenticationTypo3Service::class, + \Codappix\CdxAutoLogin\AutoAuthenticationTypo3Service::class, [ 'title' => 'Auto User authentication', 'description' => 'Auto authenticate user with configured username', @@ -81,7 +22,7 @@ if ( 'available' => true, 'priority' => 100, 'quality' => 50, - 'className' => AutoAuthenticationTypo3Service::class, + 'className' => \Codappix\CdxAutoLogin\AutoAuthenticationTypo3Service::class, ] ); } diff --git a/home/files/typo3-configuration/AutologinClass.php b/home/files/typo3-configuration/AutologinClass.php new file mode 100644 index 0000000..62170fd --- /dev/null +++ b/home/files/typo3-configuration/AutologinClass.php @@ -0,0 +1,61 @@ += 10.4 +if (class_exists(\TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::class) !== false) { + class AutoAuthenticationTypo3Service extends \TYPO3\CMS\Core\Authentication\AbstractAuthenticationService + { + public function getUser() + { + $possibleUsernames = [ + 'dsiepmann', + 'daniel.siepmann', + 'daniel_siepmann', + ]; + + foreach ($possibleUsernames as $username) { + $record = $this->fetchUserRecord($username); + if (is_array($record)) { + return $record; + } + } + + return []; + } + + public function authUser(array $user) + { + return 200; + } + } +} + +// < 10.4 +if (class_exists(\TYPO3\CMS\Sv\AbstractAuthenticationService\AbstractAuthenticationService::class) !== false) { + class AutoAuthenticationTypo3Service extends \TYPO3\CMS\Sv\AbstractAuthenticationService\AbstractAuthenticationService + { + public function getUser() + { + $possibleUsernames = [ + 'dsiepmann', + 'daniel.siepmann', + 'daniel_siepmann', + ]; + + foreach ($possibleUsernames as $username) { + $record = $this->fetchUserRecord($username); + if (is_array($record)) { + return $record; + } + } + + return []; + } + + public function authUser(array $user) + { + return 200; + } + } +} diff --git a/home/files/typo3-configuration/CachingConfigurations.php b/home/files/typo3-configuration/Caching.php similarity index 69% rename from home/files/typo3-configuration/CachingConfigurations.php rename to home/files/typo3-configuration/Caching.php index 4e00801..2f46c68 100644 --- a/home/files/typo3-configuration/CachingConfigurations.php +++ b/home/files/typo3-configuration/Caching.php @@ -4,6 +4,8 @@ // Disable some for local development // => Done inside Vim, Vim will delete some files after editing +require_once 'CachingFileBackend.php'; + // Extensions $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['thuecat_fetchdata']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['thuecat_fetchdata']['options'] = [ @@ -27,10 +29,16 @@ if ( unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['hash']['options']['compression']); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; - unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages']['options']['compression']); + unset( + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages']['options']['compression'], + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages']['options']['tokenName'], + ); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pagesection']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; - unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pagesection']['options']['compression']); + unset( + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pagesection']['options']['compression'], + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pagesection']['options']['tokenName'], + ); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['imagesizes']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['imagesizes']['options']['compression']); @@ -41,12 +49,25 @@ if ( } else { $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_rootline']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; - unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options']['compression']); + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; + unset( + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options']['compression'], + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options']['tokenName'], + ); + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; - unset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options']['compression']); + unset( + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['options']['compression'], + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['options']['tokenName'], + ); + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = \Codappix\CdxFileBackend\FileBackend::class; + unset( + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options']['compression'], + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options']['tokenName'], + ); } diff --git a/home/files/typo3-configuration/CacheFileBackend.php b/home/files/typo3-configuration/CachingFileBackend.php similarity index 100% rename from home/files/typo3-configuration/CacheFileBackend.php rename to home/files/typo3-configuration/CachingFileBackend.php diff --git a/home/files/typo3-configuration/Database.php b/home/files/typo3-configuration/Database.php index 6203a49..5e2d637 100644 --- a/home/files/typo3-configuration/Database.php +++ b/home/files/typo3-configuration/Database.php @@ -1,25 +1,13 @@ $GLOBALS['TYPO3_CONF_VARS']['DB']['database'], - 'host' => $GLOBALS['TYPO3_CONF_VARS']['DB']['host'], - 'password' => $GLOBALS['TYPO3_CONF_VARS']['DB']['password'], - 'user' => $GLOBALS['TYPO3_CONF_VARS']['DB']['username'], - 'port' => $GLOBALS['TYPO3_CONF_VARS']['DB']['port'] ?? null, - 'socket' => $GLOBALS['TYPO3_CONF_VARS']['DB']['socket'], - 'unix_socket' => $GLOBALS['TYPO3_CONF_VARS']['DB']['socket'], +$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] ?? [], [ + 'dbname' => $typo_db, + 'host' => '127.0.0.1', + 'password' => 'dev', + 'user' => 'dev', + 'port' => null, + 'socket' => '/var/run/mysqld/mysqld.sock', + 'unix_socket' => '/var/run/mysqld/mysqld.sock', 'driver' => 'mysqli', 'charset' => 'utf8mb4', 'tableoptions' => [ diff --git a/home/files/typo3-configuration/Debugging.php b/home/files/typo3-configuration/Debugging.php index eb31dfb..b598102 100644 --- a/home/files/typo3-configuration/Debugging.php +++ b/home/files/typo3-configuration/Debugging.php @@ -1,20 +1,14 @@ addData([ - 'URI' => GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), - ]); - return $logRecord; - } -} +require_once 'LoggingUriProcessor.php'; $GLOBALS['TYPO3_CONF_VARS']['LOG']['das']['writerConfiguration'] = [ \TYPO3\CMS\Core\Log\LogLevel::DEBUG => [ diff --git a/home/files/typo3-configuration/LoggingUriProcessor.php b/home/files/typo3-configuration/LoggingUriProcessor.php new file mode 100644 index 0000000..686097f --- /dev/null +++ b/home/files/typo3-configuration/LoggingUriProcessor.php @@ -0,0 +1,20 @@ +addData([ + 'URI' => GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), + ]); + return $logRecord; + } +} + diff --git a/home/files/typo3-configuration/SystemSettings.php b/home/files/typo3-configuration/SystemSettings.php index bb5287f..a00805e 100644 --- a/home/files/typo3-configuration/SystemSettings.php +++ b/home/files/typo3-configuration/SystemSettings.php @@ -15,10 +15,6 @@ } '); -$GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] = true; - -$GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer'] = ''; -$GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel'] = false; $GLOBALS['TYPO3_CONF_VARS']['SYS']['proxy_host'] = ''; $GLOBALS['TYPO3_CONF_VARS']['SYS']['proxy_port'] = ''; @@ -56,3 +52,8 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = '*.localhost DEVELOPMENT'; if (isset($GLOBALS['_SERVER']['HTTP_HOST'])) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = $GLOBALS['_SERVER']['HTTP_HOST'] . ' DEVELOPMENT'; } + +// TODO: Check readme/wiki and use provided key for project only? +if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) === false) { + $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = 'some test key'; +} diff --git a/home/files/typo3-configuration/client-specific/ClientSpecific.php b/home/files/typo3-configuration/client-specific/ClientSpecific.php index 0b66fac..f337b31 100644 Binary files a/home/files/typo3-configuration/client-specific/ClientSpecific.php and b/home/files/typo3-configuration/client-specific/ClientSpecific.php differ diff --git a/home/files/typo3-configuration/client-specific/ItccSteelnet.php b/home/files/typo3-configuration/client-specific/ItccSteelnet.php new file mode 100644 index 0000000..20bbe99 Binary files /dev/null and b/home/files/typo3-configuration/client-specific/ItccSteelnet.php differ diff --git a/home/files/typo3-configuration/client-specific/Sac.php b/home/files/typo3-configuration/client-specific/Sac.php index 8cb9007..4e1cd5a 100644 Binary files a/home/files/typo3-configuration/client-specific/Sac.php and b/home/files/typo3-configuration/client-specific/Sac.php differ diff --git a/systems/hikari3/web-development/projects/customer/itcc-steel.nix b/systems/hikari3/web-development/projects/customer/itcc-steel.nix index 08bf408..64244c0 100644 Binary files a/systems/hikari3/web-development/projects/customer/itcc-steel.nix and b/systems/hikari3/web-development/projects/customer/itcc-steel.nix differ