File tree Expand file tree Collapse file tree 1 file changed +4
-19
lines changed
Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -48,25 +48,10 @@ public function __construct(Context $context)
4848 protected function getQueryBuilder (): QueryBuilder
4949 {
5050 $ queryBuilder = GeneralUtility::makeInstance (ConnectionPool::class)->getQueryBuilderForTable ('tt_content ' );
51- if ($ this ->getServerRequest () instanceof ServerRequestInterface
52- && ApplicationType::fromRequest ($ this ->getServerRequest ())->isFrontend ()
53- ) {
54- $ queryBuilder ->setRestrictions (GeneralUtility::makeInstance (FrontendRestrictionContainer::class));
55- if ((GeneralUtility::makeInstance (Typo3Version::class))->getMajorVersion () < 12 ) {
56- // do not use FrontendWorkspaceRestriction
57- $ queryBuilder ->getRestrictions ()
58- ->removeByType (FrontendWorkspaceRestriction::class)
59- ->add (GeneralUtility::makeInstance (WorkspaceRestriction::class, $ this ->workspaceId ));
60- }
61- if ($ this ->workspaceId > 0 ) {
62- $ queryBuilder ->getRestrictions ()->removeByType (HiddenRestriction::class);
63- }
64- } else {
65- $ queryBuilder ->getRestrictions ()
66- ->removeAll ()
67- ->add (GeneralUtility::makeInstance (DeletedRestriction::class))
68- ->add (GeneralUtility::makeInstance (WorkspaceRestriction::class, $ this ->workspaceId ));
69- }
51+ $ queryBuilder ->getRestrictions ()
52+ ->removeAll ()
53+ ->add (GeneralUtility::makeInstance (DeletedRestriction::class))
54+ ->add (GeneralUtility::makeInstance (WorkspaceRestriction::class, $ this ->workspaceId ));
7055 return $ queryBuilder ;
7156 }
7257
You can’t perform that action at this time.
0 commit comments