Actions
Bug #92489
closedCalling $contentObjectRenderer->getTreeList() in eID returns empty list
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-10-06
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
During Application's bootstrap, \TYPO3\CMS\Frontend\Http\Application::initializeContext()
does that:
GeneralUtility::makeInstance(Context::class, [ 'date' => new DateTimeAspect(new \DateTimeImmutable('@' . $GLOBALS['EXEC_TIME'])), 'visibility' => new VisibilityAspect(), 'workspace' => new WorkspaceAspect(0), 'backend.user' => new UserAspect(null), 'frontend.user' => new UserAspect(null, [0, -1]), ]);
this creates a default frontend.user
aspect without any AbstractAuthenticationUser. As we see in the UserAspect constructor, this is totally legit and creates a stdClass
object in such case:
/** * @param AbstractUserAuthentication|null $user * @param array|null $alternativeGroups */ public function __construct(AbstractUserAuthentication $user = null, array $alternativeGroups = null) { $this->user = $user ?? (object)['user' => []]; $this->groups = $alternativeGroups; }
Problem is that the method ->getGroupUids()
wrongly check for either a BackendUserAuthentication
or a FrontendUserAuthentication
for returning the associated groups, which can never occur in that context.
Due to this erroneous condition, the tree list is always empty!
Actions