From a9488f4ce0ce0a58723cb7fdeb1e55d5670b9260 Mon Sep 17 00:00:00 2001 From: Christian Wolff <chris@connye.com> Date: Wed, 15 Nov 2017 10:45:25 +0100 Subject: [PATCH] [FEATURE] Add a hook to hide credentials in the Configuration module This allows extensions to hide their own credentials in the Configuration module. Resolves: #82999 Releases: master Change-Id: Idb25ab98c7986fb6f7471948b684834b608a0f0d Reviewed-on: https://review.typo3.org/54644 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Susanne Moog <susanne.moog@typo3.org> Tested-by: Susanne Moog <susanne.moog@typo3.org> --- ...ideCredentialsInTheConfigurationModule.rst | 22 +++++++++++++++++++ .../Controller/ConfigurationController.php | 8 +++++++ 2 files changed, 30 insertions(+) create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst new file mode 100644 index 000000000000..650660017a2b --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Feature-82999-AddAHookToHideCredentialsInTheConfigurationModule.rst @@ -0,0 +1,22 @@ +.. include:: ../../Includes.txt + +============================================================================ +Feature: #82999 - Add a hook to hide credentials in the Configuration module +============================================================================ + +See :issue:`82999` + +Description +=========== + +To blind additional configuration options in the Configuration module a hook has been added: + +:php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Lowlevel\ControllerConfigurationController::class]['modifyBlindedConfigurationOptions']` + + +Impact +====== + +Extension developers can use this hook to e.g. hide custom credentials in the Configuration module. + +.. index:: NotScanned \ No newline at end of file diff --git a/typo3/sysext/lowlevel/Classes/Controller/ConfigurationController.php b/typo3/sysext/lowlevel/Classes/Controller/ConfigurationController.php index e03a0e847e0d..41403cac6ede 100644 --- a/typo3/sysext/lowlevel/Classes/Controller/ConfigurationController.php +++ b/typo3/sysext/lowlevel/Classes/Controller/ConfigurationController.php @@ -166,7 +166,15 @@ class ConfigurationController if ($selectedTreeDetails['type'] === 'global') { $globalArrayKey = $selectedTreeDetails['globalKey']; $renderArray = $GLOBALS[$globalArrayKey]; + + // Hook for Processing blindedConfigurationOptions $blindedConfigurationOptions = $this->blindedConfigurationOptions; + + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['modifyBlindedConfigurationOptions'] ?? [] as $classReference) { + $processingObject = GeneralUtility::makeInstance($classReference); + $blindedConfigurationOptions = $processingObject->modifyBlindedConfigurationOptions($blindedConfigurationOptions, $this); + } + if (isset($blindedConfigurationOptions[$globalArrayKey])) { // Prepare blinding for all database connection types foreach (array_keys($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']) as $connectionName) { -- GitLab