From 585eb96efb7e13ad8e618323268f85f8fa1170a6 Mon Sep 17 00:00:00 2001 From: Marcus Schwemer Date: Tue, 20 Feb 2024 14:14:59 +0100 Subject: [PATCH 1/4] [TASK] Allow php 8.3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 34acd5de..9c9daa40 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ ], "license": "GPL-2.0-or-later", "require": { - "php": ">=8.1.0 <=8.2.99", + "php": ">=8.1.0 <=8.3.99", "ext-ldap": "*", "ext-json": "*", "typo3/cms-core": "^12" From d7351b9863edf3a5254bdc02864ef01a1270ac1e Mon Sep 17 00:00:00 2001 From: Marcus Schwemer Date: Wed, 13 Mar 2024 10:02:17 +0100 Subject: [PATCH 2/4] [BUGFIX] Avoid 'Undefined array key "uid"' In the case of a new user (and the usual case that the UID is *not* set via LDAP mapping), 'uid' is not set. This caused an 'Undefined array key "uid"' warning. --- Classes/Task/ImportUsers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Task/ImportUsers.php b/Classes/Task/ImportUsers.php index cc47abeb..b256cce6 100644 --- a/Classes/Task/ImportUsers.php +++ b/Classes/Task/ImportUsers.php @@ -173,7 +173,7 @@ public function execute() // Import the user using information from LDAP $restoreBehaviour = $this->restoredUsersHandling; - if (in_array($user['uid'], $disabledOrDeletedUserUids, true)) { + if (in_array($user['uid'] ?? 0, $disabledOrDeletedUserUids, true)) { // We disabled this user ourselves if ($this->missingUsersHandling === 'disable') { if ($restoreBehaviour === 'nothing') { From d8127bd19fceb12e7575058136d26851a85b41ae Mon Sep 17 00:00:00 2001 From: Marcus Schwemer Date: Wed, 13 Mar 2024 12:04:09 +0100 Subject: [PATCH 3/4] [TASK] Improve docheader in backend module --- Resources/Private/Language/locallang.xlf | 7 +++++++ .../Partials/ConfigurationRecords.html | 19 ++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index e51d0732..a68b2b24 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -23,6 +23,13 @@ administrator manual for further information.

Click here to create a configuration record.]]> + + Switch configuration + + + Edit current configuration + + Overview diff --git a/Resources/Private/Partials/ConfigurationRecords.html b/Resources/Private/Partials/ConfigurationRecords.html index 82f600bf..869009cf 100644 --- a/Resources/Private/Partials/ConfigurationRecords.html +++ b/Resources/Private/Partials/ConfigurationRecords.html @@ -8,20 +8,25 @@ {editLink} - -
+ +
+ class="form-select" + style="display: inline-flex; width: 100%;"/> -
- {editLink} -
+ + +
+
+ {f:translate(key: 'module_docheader.configurations.edit')} {editLink}
-
From ab26c48b05cc440858439eb7cfcfb83328830c1d Mon Sep 17 00:00:00 2001 From: Marcus Schwemer Date: Wed, 13 Mar 2024 12:09:09 +0100 Subject: [PATCH 4/4] [BUGFIX] Avoid 'Undefined array key "uid"' In case a new group is imported, the group uid is not set. Setting it to `0` in this case prevents the issue. --- Classes/Controller/ModuleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/ModuleController.php b/Classes/Controller/ModuleController.php index 323f836f..b669c49c 100644 --- a/Classes/Controller/ModuleController.php +++ b/Classes/Controller/ModuleController.php @@ -552,7 +552,7 @@ public function ajaxGroupsImport(ServerRequestInterface $request): ResponseInter // Merge LDAP and TYPO3 information $group = Authentication::merge($ldapGroup, $typo3Groups[0], $config['groups']['mapping']); - if ((int)$group['uid'] === 0) { + if ((int)($group['uid'] ?? 0) === 0) { $group = Typo3GroupRepository::add($table, $group); } else { // Restore group that may have been previously deleted