Skip to content
Snippets Groups Projects
Commit d7c8f291 authored by Alexander Opitz's avatar Alexander Opitz Committed by Susanne Moog
Browse files

[BUGFIX] Allow workspace preview inside another rootline

The rootline for page view now depends on the webmounts of the workspace
the preview link was generated on and not the webmounts the beuser, who
generated the preview link, is at the moment of calling the preview
link.

Resolves: #83547
Releases: master, 8.7
Change-Id: I53c8d45260b79c4d5679f00084fe81b502668ee7
Reviewed-on: https://review.typo3.org/55341


Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarSusanne Moog <susanne.moog@typo3.org>
Tested-by: default avatarSusanne Moog <susanne.moog@typo3.org>
parent 669f67d3
Branches
Tags
No related merge requests found
......@@ -114,6 +114,8 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface
$tempBackendUser->setBeUserByUid($this->previewConfiguration['BEUSER_uid']);
if ($tempBackendUser->user['uid']) {
$tempBackendUser->unpack_uc();
$tempBackendUser->setTemporaryWorkspace($workspaceUid);
$tempBackendUser->user['workspace_id'] = $workspaceUid;
$tempBackendUser->fetchGroupData();
// Handle degradation of admin users
if ($tempBackendUser->isAdmin()) {
......@@ -137,7 +139,7 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface
->execute()
->fetch();
// Either use configured workspace mount or current page id, if admin user does not have any page mounts
// Either use configured workspace mount (of the workspace) or current page id
if (empty($tempBackendUser->groupData['webmounts'])) {
$tempBackendUser->groupData['webmounts'] = !empty($workspaceRecord['db_mountpoints']) ? $workspaceRecord['db_mountpoints'] : $pObj->id;
}
......
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