Skip to content
  • Benni Mack's avatar
    [TASK] Move BE_USER check from TSFE into middleware · bb270640
    Benni Mack authored
    
    
    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.
    
    Resolves: #97176
    Releases: main
    Change-Id: I3bc1a8709288f01fe6978982572acba6f53f77b3
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73905
    Tested-by: default avatarOliver Bartsch <bo@cedev.de>
    Tested-by: default avatarSusanne Moog <look@susi.dev>
    Tested-by: default avatarcore-ci <typo3@b13.com>
    Tested-by: default avatarBenni Mack <benni@typo3.org>
    Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
    Reviewed-by: default avatarSusanne Moog <look@susi.dev>
    Reviewed-by: default avatarBenni Mack <benni@typo3.org>
    bb270640