Issue Bug Closed

#103611Use WorkspaceRestriction in BackendUtility only if workspace is loaded

Sven Wappler 04/11/24, 15:28 updated 07/31/24, 09:18

Description

The function getRecordLocalization throws an error, because WorkspaceRestriction:class is called, even workspace module isn’t loaded. Please add a check before.

            $queryBuilder->getRestrictions()
                ->removeAll()
                ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
                ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, static::getBackendUserAuthentication()->workspace));

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.