1. 21 Jun, 2022 1 commit
  2. 07 Jun, 2022 1 commit
    • Benni Mack's avatar
      [!!!][FEATURE] Introduce PSR-14 events in TSFE page resolving · 3a25c94b
      Benni Mack authored
      This change introduces three new PSR-14 Events in favor
      of the following hooks:
      * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PreProcessing']
      replaced by "BeforePageIsResolvedEvent"
      * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['fetchPageId-PostProcessing']
      * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess']
      replaced by "AfterPageWithRootLineIsResolvedEvent"
      * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['determineId-PostProc']
      * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_postProcess']
      replaced by "AfterPageAndLanguageIsResolvedEvent"
      Due to the restructuring of TSFE in the past versions, it became
      obvious that several hooks are called right after each other,
      making them superfluous. For this reason, they have been unified.
      The new PSR-14 Events are more powerful as they also contain the
      current request.
      In addition TSFE->determineId() can now intercept the process
      by properly returning a Response object.
      Resolves: #97737
      Releases: main
      Change-Id: I9f82ba79c89826208a1131663a1b8b5e2e2781c9
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74516
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
  3. 04 May, 2022 1 commit
  4. 29 Apr, 2022 1 commit
  5. 25 Apr, 2022 2 commits
  6. 22 Apr, 2022 1 commit
    • Benni Mack's avatar
      [!!!][FEATURE] Introduce dedicated class to create typolinks with unified Event · 4f7c4d1c
      Benni Mack authored and Oliver Bartsch's avatar Oliver Bartsch committed
      This change moves all "typolink" functionality
      from cObj->typolink into a custom "LinkFactory"
      class which then calls custom LinkBuilders (as before)
      to do their work.
      The main benefit is separation of concerns, thinning
      out functionality from the monster ContentObjectRenderer
      Instead of the global hook
      a new PSR-14 Event "AfterLinkIsGeneratedEvent" is introduced,
      which in turn uses the LinkResult to operate on.
      This new Event also makes the hook
      obsolete, which was used for non-page links + URLs. As
      all functionality for frontend links are now running
      through this event, which contains all information.
      In addition, typolink.userFunc now receives
      a LinkResult object instead of a <a> string with arguments,
      and needs to return a LinkResult object again.
      Also, the ATagParams hook vanished as well, since the
      new Event can be used easily (and in a much better way!)
      Both parts are breaking, all other parts are expected
      to work as before.
      A new HtmlLinkResult is added, which allows for building
      a HSC'ed <a> tag properly in typolink().
      Architectural Details:
      * LinkFactory (new class) is now handling the "typolink" logic
        for creating any kind of links or URLs (page/mails/files).
        For the actual logic of e.g, pages the "PageLinkBuilder" is used
        in this place.
      * Internally, LinkFactory follows the same generation as
        cObj->typolink() before, but uses methods to make the code
        more readable.
      * In the end, LinkFactory will return a "LinkResultInterface"
        which contains everything to build a <a> tag, however it
        cannot return a "UriInterface" from PSR-7, as a
        link to mailto: is not a URL, thus, not supported by PSR-7.
      * The main "cObj->typolink()" method then takes the LinkResultInterface
        and wraps it into a HtmlLinkResult which does a htmlspecialchars()
        around all the attributes and the $linkText. So this is still
        the way to go to use from a public API point of view.
      * As typolink() heavily depends on stdWrap() and thus on cObject
        this information needs to be injected properly of course, and
        has the hard dependency when creating links in the Frontend.
      * new methods $cObj->createUrl() and $cObj->createLink() are added
        to make use of the LinkInterface functionality programmatically,
        so people can choose to get a hsc'ed result via typolink(),
        or typolink_URL(), or a pure data via createUrl() and createLink().
      Next steps / further patches:
      * Deprecate "lastTypoLink_LD" etc.
      * Move LinkResultFactory into LinkFactory with ClassAlias
      * Maybe add another method to just generate an URL to the LinkFactory
      * Create JsonLinkResult object and clean up original LinkResult object
      Resolves: #96641
      Resolves: #92029
      Releases: main
      Change-Id: Ic9ce01153a0cfdcbacb15e1e3f3e382f95400192
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72999
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
      Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
      Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
  7. 01 Apr, 2022 1 commit
    • Christian Kuhn's avatar
      [!!!][TASK] Simplify TCA authMode settings · 2f0338a9
      Christian Kuhn authored and Benni Mack's avatar Benni Mack committed
      To prepare towards a deployable backend group access
      rights system, some of the more obscure options are
      removed to reduce overall complexity.
      * TYPO3_CONF_VARS['BE']['explicitADmode'] is finally
        gone: Following a deny list approach is a flawed security
        system. TYPO3's default setting (explicitADmode=allow)
        follows the very common "Least Privileged" principle,
        so editors need to be explicitly given access to a
        CType, as is done with all other permissions.
      * The only valid value for TCA config option "authMode"
        on type="select" fields is now "explicitAllow". The
        previous "explicitDeny" value is abandoned following
        the reasoning above. The value "individual" is abandoned
        since it is a very rarely used setting (not a single
        match in TER).
      * With authMode="individual" being gone, the select item
        array keys on position six that could be set to "EXPL_DENY"
        and "EXPL_ALLOW" are obsolete.
      * Field "explicit_allowdeny" in table be_groups is
        simplified. This was a comma separated list of
        colon separated: "table:field:value:ALLOW/DENY".
        The last "ALLOW" or "DENY" is now obsolete.
      The patch removes the above handling from the core. A
      TCA migration scans TCA for invalid options and adapts
      them. An upgrade wizard is in place to clean up the
      be_groups explicit_allowdeny field of existing rows.
      Resolves: #97265
      Releases: main
      Change-Id: I545b08fc694e9081ad79e69e7f55f684316e7b0f
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74126
      Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
  8. 25 Mar, 2022 1 commit
  9. 24 Mar, 2022 1 commit
  10. 23 Mar, 2022 2 commits
  11. 21 Mar, 2022 1 commit
  12. 14 Mar, 2022 1 commit
  13. 13 Mar, 2022 1 commit
  14. 09 Mar, 2022 1 commit
  15. 23 Feb, 2022 1 commit
  16. 22 Feb, 2022 1 commit
  17. 17 Feb, 2022 1 commit
  18. 15 Feb, 2022 2 commits
  19. 10 Feb, 2022 1 commit
  20. 31 Jan, 2022 1 commit
  21. 16 Jan, 2022 1 commit
  22. 14 Jan, 2022 1 commit
  23. 13 Jan, 2022 2 commits
  24. 13 Dec, 2021 1 commit
  25. 08 Dec, 2021 1 commit
  26. 06 Dec, 2021 1 commit
  27. 02 Dec, 2021 2 commits
  28. 01 Dec, 2021 3 commits
  29. 30 Nov, 2021 3 commits
  30. 28 Nov, 2021 2 commits