Review main Abandoned

87780[BUGFIX] Fix broken mount point handling permission check

Andreas Kienast CR 0 V -1 Normal +48 −59 updated 04/22/26, 13:43

Commit message

The category mount point permission check has some major flaws that need
to get fixed.

The tree node collection is backed up into `$treeNodeCollection` without
using `clone`, which isn't a backup since PHP treats object assignments
as references.

The second issue is that the code later checks whether the category
mount point is part of its own children.

Review

  • Code review CR 0
  • Verified V -1
    • core-ci -1 CI

Issues 4

Files 4

Review log 3550

Show 1525 earlier messages
  1. Andreas Kienast uploaded patch set 1 01/16/25, 13:34

  2. core-ci voted on patch set 1 V -1 01/16/25, 13:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72560

  3. Andreas Kienast uploaded patch set 2 V -1 01/16/25, 14:55

  4. core-ci voted on patch set 2 V -1 01/16/25, 15:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72561

  5. Andreas Kienast uploaded patch set 3 V -1 01/16/25, 15:01

  6. core-ci voted on patch set 3 V -1 01/16/25, 15:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72562

  7. Andreas Kienast uploaded patch set 4 V -1 01/16/25, 15:28

  8. core-ci voted on patch set 4 V +1 01/16/25, 15:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72566

  9. Andreas Kienast uploaded patch set 5 V +1 01/16/25, 15:35

  10. Andreas Kienast marked it ready for review 01/16/25, 15:35

  11. Andreas Kienast marked it work in progress 01/16/25, 15:40

  12. core-ci voted on patch set 5 V +1 01/16/25, 15:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72569

  13. Andreas Kienast uploaded patch set 6 V +1 01/16/25, 15:44

  14. Andreas Kienast marked it ready for review 01/16/25, 15:45

  15. core-ci voted on patch set 6 V +1 01/16/25, 15:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72570

  16. Andreas Kienast uploaded patch set 7 V +1 03/04/25, 07:49

  17. Andreas Kienast uploaded patch set 8 03/04/25, 07:53

  18. core-ci voted on patch set 7 V +1 03/04/25, 08:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75074

  19. core-ci voted on patch set 8 V +1 03/04/25, 08:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75075

  20. Andreas Kienast uploaded patch set 9 V +1 03/26/25, 06:54

  21. core-ci voted on patch set 9 V +1 03/26/25, 07:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76344

  22. Benni Mack commented on patch set 10 V +1 03/27/25, 21:53

    Published edit on patch set 9.
  23. core-ci voted on patch set 10 V +1 03/27/25, 22:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76525

  24. Benni Mack commented on patch set 10 03/28/25, 12:07

    We can finally bring this in. I hope it's ok, if you can add a Test for the PermissionAspect (functional) - see https://review.typo3.org/c/Packages/TYPO3.CMS/+/77642 - where we have some side-effects and starting with some funtional tests here would be amazing!
  25. Benni Mack rebased onto patch set 11 V +1 04/11/25, 20:04

  1. core-ci voted on patch set 11 V +1 04/11/25, 20:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77575

  2. Mathias Brodala commented on patch set 11 CR -1 07/23/25, 10:58

    CategoryPermissionsAspect.php:71

    The clone should happen afterwards, otherwise it's a waste of time/resources.
  3. Sven Liebert commented on patch set 11 V -1 07/23/25, 13:03

    Here is something weired. As maintainer/admin all is fine. See the screenshot here: https://ibb.co/6cyq0wyg As editor all categories are doubled and one level to deep ("Schulungskategorien" exists twice in levels): https://ibb.co/tPLXnTX8 The code looks something like that: ```php 'category' => [ 'exclude' => 0, 'label' => 'LLL:EXT:extension/Resources/Private/Language/locallang_db.xlf:question.category', 'config' => [ 'type' => 'category', 'treeConfig' => [ 'startingPoints' => '###SITE:educationRootCategory###', ], 'required' => true, ], ], ``` SITE:educationRootCategory contains the pageId '5'
  4. Sven Liebert commented on patch set 11 CR +1 V +1 07/23/25, 13:18

    Reply

    The problem was here. Some mount points for parent groups
  5. Andreas Kienast uploaded patch set 12 CR +1 V +1 07/24/25, 12:33

  6. Andreas Kienast commented on patch set 12 07/24/25, 12:33

    CategoryPermissionsAspect.php:71 Reply

    Done
  7. core-ci voted on patch set 12 V +1 07/24/25, 12:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82239

  8. Sven Liebert voted on patch set 12 CR +1 V +1 07/24/25, 12:43

  9. Benni Mack voted on patch set 12 CR +1 07/25/25, 18:50

  10. Simon Schaufelberger commented on patch set 12 07/25/25, 19:13

    is backend?
  11. Andreas Kienast updated the commit message in patch set 13 CR +1 V +1 07/29/25, 09:29

  12. Andreas Kienast commented on patch set 13 07/29/25, 09:29

    Reply

    Done
  13. Simon Schaufelberger voted on patch set 13 CR +1 V +1 07/29/25, 09:34

  14. core-ci voted on patch set 13 V +1 07/29/25, 09:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82475

  15. Sven Liebert voted on patch set 13 CR +1 V +1 07/29/25, 09:39

  16. Andreas Kienast updated the commit message in patch set 14 CR +1 V +1 07/30/25, 11:27

  17. core-ci voted on patch set 14 V +1 07/30/25, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82550

  18. Sven Liebert voted on patch set 14 CR +1 V +1 07/30/25, 11:42

  19. Benni Mack commented on patch set 14 07/31/25, 16:30

    Unresolved

    I'm not sure if I'm convinced: I have this in my page TSconfig: TCEFORM.pages.categories.config.treeConfig.startingPoints = 2 I have three categories: - [1] My Category - [2] Das ist Kategorie 2 - [3] Das ist unter Kategorie 3 As an admin I see - [2] Das ist Kategorie 2 - [3] Das ist unter Kategorie 3 That looks correct to me. As an editor I see: - [2] Das ist Kategorie 2 - [2] Das ist Kategorie 2 - [3] Das ist unter Kategorie 3 I feel this is wrong. That is the result WITH this patch. That is the result WITH be_groups.category_perms = "" (nothing selected). WITHOUT The patch, as an editor I see: - [2] Das ist Kategorie 2 This is also wrong?
  20. Sven Liebert voted on patch set 14 CR 0 V 0 08/24/25, 20:37

  21. Sven Liebert voted on patch set 14 V -1 08/24/25, 20:38

  22. Benni Mack wrote 04/21/26, 15:01

    Removed reviewer Benni Mack.
  23. Benni Mack updated the commit message in patch set 15 V +1 04/22/26, 06:53

  24. core-ci voted on patch set 15 V -1 04/22/26, 11:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100823

  25. Andreas Kienast abandoned the change 04/22/26, 13:43

    Stale and hard to test. Feel free to pick it up again.