Review main Merged

69634[BUGFIX] Respect 'ignoreRootLevelRestriction' setting

Albrecht Köhnlein CR +2 V +2 Easy +4 −0 updated 08/10/21, 12:56

Commit message

Respect 'ignoreRootLevelRestriction' TCA setting when fetching history
records. This is required for non-admins to be able to revert auto
generated redirects. Otherwise the page access check always would fail,
because the redirects are created on page id 0 where a non-admin user
never has access to.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Josef Glatz +1
    • Xavier Perseguers +1
    • Henrik Elsner +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Josef Glatz +1
    • Henrik Elsner +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 2124

  1. Albrecht Köhnlein uploaded patch set 1 06/28/21, 11:20

  2. core-ci voted on patch set 1 V +1 06/28/21, 11:31 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12773

  3. Henrik Elsner commented on patch set 1 V +1 CR +1 07/05/21, 07:32

    I tested this in my v10 instance and it worked perfectly fine. Thx for the patch
  4. Geert Boetzkes voted on patch set 1 CR +1 07/07/21, 09:06

  5. Benni Mack commented on patch set 1 CR -1 07/09/21, 10:23

    RecordHistory.php:273

    shouldn't this be handled via the ignoreRootLevelRestrictions information in TCA? This way, it could also work for sys_file_metadata and probably solve some other issues there. looks like this information is not evaluated here. hasPageAccess should check for this information IMHO.
  6. Albrecht Köhnlein uploaded patch set 2 07/09/21, 17:43

  7. Albrecht Köhnlein commented on patch set 2 07/09/21, 17:45

    RecordHistory.php:273 Reply Unresolved

    Of course, you're right. I didn't know about 'ignoreRootLevelRestriction' setting and changed the merge request now.
  8. core-ci voted on patch set 2 V +1 07/09/21, 17:54 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13162

  9. Benni Mack voted on patch set 2 CR +1 07/09/21, 20:43

  10. Geert Boetzkes voted on patch set 2 CR +1 07/12/21, 08:15

  11. Henrik Elsner commented on patch set 2 V +1 CR +1 07/12/21, 08:39

    Once again i can confirm this works in my v10
  12. Tobias Wojtylak voted on patch set 2 CR +1 07/13/21, 12:34

  13. Georg Ringer commented on patch set 2 CR -1 07/15/21, 12:21

    RecordHistory.php:431

    should be changed to $GLOBALS['TCA'][$table]['ctrl']['security']['ignoreRootLevelRestriction'] ?? false to avoid notices and errors on php8
  14. Henrik Elsner commented on patch set 2 07/15/21, 12:26

    RecordHistory.php:431 Reply Unresolved

    ill do that
  15. Henrik Elsner uploaded patch set 3 07/15/21, 12:27

  16. Georg Ringer voted on patch set 3 CR +1 07/15/21, 12:34

  17. core-ci voted on patch set 3 V +1 07/15/21, 12:41 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13357

  18. Henrik Elsner voted on patch set 3 V +1 CR +1 07/15/21, 12:50

  19. Henrik Elsner commented on patch set 3 07/19/21, 07:20

    TESTING: - Use an editor account (no admin!) - Change a page slug and revert the redirects - see that the revert did not work (thats the issue here) apply patch -> works
  20. Xavier Perseguers voted on patch set 3 CR +1 07/19/21, 07:52

  21. Josef Glatz commented on patch set 3 V +1 CR +1 07/20/21, 13:15

    Handy patch. From my point of view and with my understanding is this a good place to solve the problem.
  22. Henrik Elsner commented on patch set 3 08/10/21, 09:52

    I'm still hoping for this one to be merged soon. I guess most people are not even aware of the issue, as they cannot see the reversing not happening
  23. Georg Ringer voted on patch set 3 V +2 CR +2 08/10/21, 12:56

  24. Georg Ringer merged patch set 4 08/10/21, 12:56