• Susanne Moog's avatar
    [BUGFIX] Reimplement previewing of date / usergroup restricted content · a672d33a
    Susanne Moog authored and Susanne Moog's avatar Susanne Moog committed
    Preview functionality was only implemented in the Admin Panel. Previewing
    itself (as in being able to preview pages with access or user restrictions)
    should also work without having the admin panel installed and open.
    
    The basic process is now like this:
    - Backend generates preview URLs for pages with access restrictions
    -- starttime, endtime, fe groups
    --> parameters ADMCMD_simUser and ADMCMD_simTime are appended to the FE URL
    - Frontend PreviewSimulator Middleware uses these parameters to modify
    the current Context
    - Adminpanel - if installed and open - takes given parameters as settings
    for preview date/time/group - when user changes those, they are overwritten
    
    Technical Changes:
    - BackendUtility: Enable link generation for a specified context
    - DateTimeAspect: Add new property to aspect to mirror SIM_ACCESS_TIME global
    - PageRepository: Use new DateTimeAspect context property for enable fields
    - AdminPanel: Set $_GET params in settings if given, remove $_GET vars if user
    saves admin panel settings (to allow user to change date/time in AdminPanel)
    
    Resolves: #86653
    Releases: master, 9.5
    Change-Id: I3a2302845461e9c18f9349438e10f1c059a85e48
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59927
    
    
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
    Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Reviewed-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
    Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    a672d33a