Review main Merged

72796[BUGFIX] Resolve shortcuts in HMENU to access restricted pages

Benni Mack CR +2 V +2 Normal +120 −45 updated 12/23/21, 13:16

Commit message

There is a difference between

> typolink.linkAccessRestrictedPages = 1 (only a toggle)
and
> HMENU.showAccessRestrictedPages = [pageId]|NONE

HMENU.showAccessRestrictedPages behaves like
the global option "config.typolinkLinkAccessRestrictedPages"

Basically, if a page is access restricted, link
to a different {pageId}.

This change explains the behavior:
-- https://review.typo3.org/c/Packages/TYPO3.CMS/+/35908/

"typolink.linkAccessRestrictedPages" in contrast
still links to the actual disallowed page, which
is also nice in case you have a 403 error page in place.

This change fixes the behaviour of HMENU to behave
EXACTLY like the global config.typolinkLinkAccessRestrictedPages,
previously HMENU did some magic PLUS it set
"typolink.linkAccessRestrictedPages"

With this change, shortcuts to access restricted pages
now get properly transformed and linked for menus.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Jochen Roth +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Jochen Roth +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 3

Files 5

Review log 1319

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

  2. Benni Mack updated the commit message in patch set 2 12/22/21, 22:53

  3. core-ci voted on patch set 1 V -1 12/22/21, 23:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21406

  4. core-ci voted on patch set 2 V -1 12/22/21, 23:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21407

  5. Benni Mack uploaded patch set 3 12/23/21, 08:09

  6. core-ci voted on patch set 3 V -1 12/23/21, 08:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21411

  7. Benni Mack uploaded patch set 4 12/23/21, 08:53

  8. core-ci voted on patch set 4 V +1 12/23/21, 09:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21412

  9. Benni Mack uploaded patch set 5 12/23/21, 09:19

  10. core-ci voted on patch set 5 V +1 12/23/21, 09:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21414

  11. Stefan Bürk commented on patch set 5 12/23/21, 09:53

    PageLinkBuilder.php:344

    If PageLinkBuilder got reused somehow, this would eventally lead to having missing group access where. Shouldn't we save the previous value and restore it afterwards ?
  12. Benni Mack uploaded patch set 6 12/23/21, 10:13

  13. Benni Mack commented on patch set 5 12/23/21, 10:13

    PageLinkBuilder.php:344 Reply

    Done
  14. core-ci voted on patch set 6 V +1 12/23/21, 10:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21417

  15. Jochen Roth voted on patch set 6 V +1 CR +1 12/23/21, 13:12

  16. Stefan Bürk voted on patch set 6 V +1 CR +1 12/23/21, 13:13

  17. Oli Bartsch voted on patch set 6 V +1 CR +1 12/23/21, 13:15

  18. Benni Mack voted on patch set 6 V +2 CR +2 12/23/21, 13:16

  19. Benni Mack merged patch set 7 12/23/21, 13:16