Issue Bug Closed

#105183FrontendRestrictionContainer applied in BE context while in workspace

Heiko Fischer 10/02/24, 09:14 updated 02/28/25, 13:37

Description

We try to load a model, which has assigned fe_groups, per magic “findBy” method from a repository while being in BE context. Relations on models show the same behaviour.

*Problem*
When the BE user is in a workspace PageRepository->getWorkspaceVersionOfRecord() is called. There gets a FrontendRestrictionContainer applied to the querybuilder without checking the context:

        // If version found, check if it could have been selected with enableFields on
        // as well:
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
        $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class, $this->context));

This causes models restricted by fe_groups to not be loaded in BE context.

Reviews 0

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

History 2

  1. Benni Mack commented and changed status New Needs Feedback 11/22/24, 15:15

    thank you for report and sorry for not getting back to you sooner.

    we’ve overcome this in v12, can you let me know if this issue persists in v12+?

  2. Riccardo De Contardi commented and changed status Needs Feedback Closed 02/28/25, 13:37

    I hope it is safe to close this one for lack of feedback

    If you think that this is the wrong decision or experience the issue again, please reopen it or ping me and I’ll do it

    Thank you.