Review main Merged

73905[TASK] Move BE_USER check from TSFE into middleware

Benni Mack CR +2 V +2 Normal +54 −80 updated 03/14/22, 15:37

Commit message

This change moves the check if a page can be
accessed by a BE_USER and if a page is rendered
in preview, while executing a Frontend Request,
to the PSR-15 "TypoScriptFrontendInitialization"
middleware.

This way, TSFE itself does not need to know / set
any preview mechanism itself, since this is now
handled already during the Frontend Request flow.

For this reason, the "determineId()" method can
now include the logic of "fetch_the_id()",
allowing "fetch_the_id()" (protected) to be
completely removed. It's now much easier to
grasp that "determineId()" actually just
determines the final ID / Page / Rootline incl.
translations based on the given request.

This is a precursor patch to introduce new
PSR-14 events that are better suited in the
request workflow than existing hooks.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Susi Moog +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Susi Moog +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1521

  1. Benni Mack uploaded patch set 1 03/12/22, 21:18

  2. core-ci voted on patch set 1 V +1 03/12/22, 21:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24850

  3. Benni Mack updated the commit message in patch set 2 03/13/22, 16:21

  4. Benni Mack updated the commit message in patch set 3 03/13/22, 16:21

  5. core-ci voted on patch set 2 V +1 03/13/22, 16:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24858

  6. core-ci voted on patch set 3 V +1 03/13/22, 16:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24859

  7. Benni Mack commented on patch set 4 03/13/22, 20:29

    Published edit on patch set 3.
  8. core-ci voted on patch set 4 V +1 03/13/22, 20:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24860

  9. Susi Moog commented on patch set 4 03/14/22, 11:30

    TypoScriptFrontendInitialization.php:119

    is there a reason why we cannot move this to the PreviewSimulator and just check the context (frontend.preview) here directly?
  10. Benni Mack commented on patch set 4 03/14/22, 11:33

    TypoScriptFrontendInitialization.php:119 Reply

    nope. will try
  11. Benni Mack uploaded patch set 5 03/14/22, 11:38

  12. Benni Mack commented on patch set 5 03/14/22, 11:39

    TypoScriptFrontendInitialization.php:119 Reply

    Done
  13. core-ci voted on patch set 5 V +1 03/14/22, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24874

  14. Susi Moog voted on patch set 5 CR +1 03/14/22, 12:34

  15. Susi Moog voted on patch set 5 V +1 03/14/22, 12:47

  16. Oli Bartsch uploaded patch set 6 03/14/22, 15:24

  17. Oli Bartsch voted on patch set 6 V +1 CR +1 03/14/22, 15:24

  18. Susi Moog voted on patch set 6 V +1 CR +1 03/14/22, 15:26

  19. core-ci voted on patch set 6 V +1 03/14/22, 15:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/24885

  20. Benni Mack voted on patch set 6 V +2 CR +2 03/14/22, 15:37

  21. Benni Mack merged patch set 7 03/14/22, 15:37