Commit 81baeede authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[BUGFIX] Don't limit module data to the BE login session

While implementing the ModuleData API
in #96895, the data to be fetched was
accidentally be limited to be session-lasting.

Since module settings should be kept for
a user when logging out, the corresponding
"ses" parameter is removed again.

Resolves: #96957
Related: #96895
Releases: main
Change-Id: I383f310578d90e5b1d544e9cb57cebc523b307fa
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73592

Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
parent 09d9c87b
......@@ -219,7 +219,7 @@ class PageLayoutController
}
// Clean up settings
if ($this->moduleData->cleanUp($this->MOD_MENU)) {
$backendUser->pushModuleData('web_layout', $this->moduleData->toArray());
$backendUser->pushModuleData($this->moduleData->getModuleIdentifier(), $this->moduleData->toArray());
}
if ($backendUser->workspace !== 0) {
// Show all elements in draft workspaces
......
......@@ -94,7 +94,7 @@ class BackendModuleValidator implements MiddlewareInterface
}
// Get stored module data
if (!is_array(($persistedModuleData = $backendUser->getModuleData($module->getIdentifier(), 'ses')))) {
if (!is_array(($persistedModuleData = $backendUser->getModuleData($module->getIdentifier())))) {
$persistedModuleData = [];
}
......
......@@ -145,7 +145,7 @@ final class TableListViewHelper extends AbstractBackendViewHelper
$pageId = (int)($request->getParsedBody()['id'] ?? $request->getQueryParams()['id'] ?? 0);
$pointer = (int)($request->getParsedBody()['pointer'] ?? $request->getQueryParams()['pointer'] ?? 0);
$pageInfo = BackendUtility::readPageAccess($pageId, $backendUser->getPagePermsClause(Permission::PAGE_SHOW)) ?: [];
$existingModuleData = $backendUser->getModuleData('web_list', 'ses');
$existingModuleData = $backendUser->getModuleData('web_list');
$moduleData = new ModuleData('web_list', is_array($existingModuleData) ? $existingModuleData : []);
$dbList = GeneralUtility::makeInstance(DatabaseRecordList::class);
......
......@@ -172,7 +172,7 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
$permsClause = $backendUser->getPagePermsClause(Permission::PAGE_SHOW);
$pageInfo = BackendUtility::readPageAccess($this->expandPage, $permsClause);
$existingModuleData = $backendUser->getModuleData('web_list', 'ses');
$existingModuleData = $backendUser->getModuleData('web_list');
$moduleData = new ModuleData('web_list', is_array($existingModuleData) ? $existingModuleData : []);
$dbList = GeneralUtility::makeInstance(ElementBrowserRecordList::class);
......
Supports Markdown
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