Commit 74612910 authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[BUGFIX] Consequently forward backend user context in DataHandler

DataHandler can be invoked with an individual backend user context and
will fall back to $GLOBALS['BE_USER'] in case it's not defined. In order
to make use of that behavior completely this individual context has to
be forwarded to all nested DataHandler instances as well.

Resolves: #85920
Releases: master
Change-Id: Ibcbba7d04d0967955937f838b6514a478b88d038
Reviewed-on: https://review.typo3.org/57985


Reviewed-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarDaniel Gorges <daniel.gorges@b13.de>
Tested-by: default avatarDaniel Gorges <daniel.gorges@b13.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent 1726fc56
......@@ -1136,7 +1136,7 @@ class DataHandler implements LoggerAwareInterface
// Default is to create a version of the individual records... element versioning that is.
'label' => 'Auto-created for WS #' . $this->BE_USER->workspace
];
$tce->start([], $cmd);
$tce->start([], $cmd, $this->BE_USER);
$tce->process_cmdmap();
$this->errorLog = array_merge($this->errorLog, $tce->errorLog);
// If copying was successful, share the new uids (also of related children):
......@@ -5029,7 +5029,7 @@ class DataHandler implements LoggerAwareInterface
/** @var DataHandler $tce */
$tce = GeneralUtility::makeInstance(__CLASS__);
$tce->enableLogging = $this->enableLogging;
$tce->start([], $removeArray);
$tce->start([], $removeArray, $this->BE_USER);
$tce->process_cmdmap();
unset($tce);
}
......@@ -5465,7 +5465,7 @@ class DataHandler implements LoggerAwareInterface
$dataHandler = GeneralUtility::makeInstance(__CLASS__);
$dataHandler->enableLogging = $this->enableLogging;
$dataHandler->neverHideAtCopy = true;
$dataHandler->start([], $command);
$dataHandler->start([], $command, $this->BE_USER);
$dataHandler->process_cmdmap();
unset($dataHandler);
......
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