Skip to content
Snippets Groups Projects
Commit ca9a3071 authored by Christian Kuhn's avatar Christian Kuhn Committed by Georg Ringer
Browse files

[TASK] Remove obsolete hack in TsConfigTreeBuilder

UserTs building has a hack for sys_note setting
TCAdefaults.sys_note.author and
TCAdefaults.sys_note.email.

These two fields have been removed from table sys_note
in 6.0, the options are useless and can be removed:
The creating user uid is stored in field 'cruser',
resolving to human readable names is done when rendering
notes.

Change-Id: I562678a516c7fc8284f82a1123035ce06bd7a188
Resolves: #99507
Related: #97816
Releaeses: main
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77319


Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent 81d4f020
Branches
Tags
No related merge requests found
......@@ -63,11 +63,6 @@ final class TsConfigTreeBuilder
// @todo: Could we maybe solve this differently somehow? Maybe in ext:adminpanel in FE directly?
$includeTree->addChild($this->getTreeFromString('userTsConfig-admpanel', 'admPanel.enable.all = 1'));
}
// @todo: Get rid of this, maybe by using a hook in DataHandler?
$includeTree->addChild($this->getTreeFromString(
'userTsConfig-sysnote',
'TCAdefaults.sys_note.author = ' . ($backendUser->user['realName'] ?? '') . chr(10) . 'TCAdefaults.sys_note.email = ' . ($backendUser->user['email'] ?? '')
));
foreach ($backendUser->userGroupsUID as $groupId) {
// Loop through all groups and add their 'TSconfig' fields
if (!empty($backendUser->userGroups[$groupId]['TSconfig'] ?? '')) {
......
......@@ -74,13 +74,11 @@ class BackendUserAuthenticationTest extends FunctionalTestCase
public function userTsConfigIsResolvedProperlyWithPrioritization(): void
{
$GLOBALS['TYPO3_CONF_VARS']['BE']['defaultUserTSconfig'] = "custom.generic = installation-wide-configuration\ncustom.property = from configuration";
$this->subject->user['realName'] = 'Test user';
$this->subject->user['TSconfig'] = 'custom.property = from user';
$this->subject->userGroupsUID[] = 13;
$this->subject->userGroups[13]['TSconfig'] = "custom.property = from group\ncustom.groupProperty = 13";
$this->subject->fetchGroupData();
$result = $this->subject->getTSConfig();
self::assertEquals($this->subject->user['realName'], $result['TCAdefaults.']['sys_note.']['author']);
self::assertEquals('from user', $result['custom.']['property']);
self::assertEquals('13', $result['custom.']['groupProperty']);
self::assertEquals('installation-wide-configuration', $result['custom.']['generic']);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment