Review main Merged

92663[BUGFIX] Handle root-level permissions correctly for record deletion

Bastien Lutz CR +2 V +2 Easy +27 −1 updated 02/05/26, 09:12

Commit message

Ensure that root-level page restrictions are respected when deleting
records, allowing proper permission checks for non-admin users with
table modify permissions.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Oliver Hader +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Oliver Hader +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1418

  1. Bastien Lutz uploaded patch set 1 02/04/26, 13:21

  2. core-ci voted on patch set 1 V -1 02/04/26, 13:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95026

  3. Benni Mack commented on patch set 1 02/04/26, 14:17

    DataHandler.php:7527

    RestrictionRootLevel is always true
  4. Bastien Lutz uploaded patch set 2 V -1 02/04/26, 14:51

  5. Bastien Lutz commented on patch set 2 02/04/26, 14:55

    DataHandler.php:7527 Reply

    As some functional tests failed i noticed, that hasPagePermission() is just the wrong place to check as page permission don't need to be checked on root level with ignoreRootLevelRestriction=true. Also the record TCA must be checked not the page one. Anyway the new patchset should fix this.
  6. core-ci voted on patch set 2 V +1 02/04/26, 15:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95044

  7. Oliver Hader uploaded patch set 3 V +1 02/04/26, 16:38

  8. Oliver Hader commented on patch set 2 02/04/26, 16:38

    DataHandler.php:5388

    That's unfortunately a drawback of the SchemaAPI - `hasCapability(TcaSchemaCapability::RestrictionRootLevel)` is always true It should be like ``` $schema->getCapability(TcaSchemaCapability::RestrictionRootLevel)->shallIgnoreRootLevelRestriction() ```
  9. Oliver Hader commented on patch set 3 02/04/26, 16:39

    DataHandler.php:5388 Reply

    Done
  10. Oliver Hader voted on patch set 3 CR +1 V +1 02/04/26, 16:45

  11. core-ci voted on patch set 3 V +1 02/04/26, 16:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95072

  12. Mathias Brodala commented on patch set 3 02/05/26, 08:34

    DataHandler.php:5399

    IMO "$allowRootLevelDeletion" would be easier to read than a double negation.
  13. Oli Bartsch uploaded patch set 4 CR +1 V +1 02/05/26, 08:51

  14. Oli Bartsch commented on patch set 4 02/05/26, 08:51

    DataHandler.php:5399 Reply

    Done
  15. core-ci voted on patch set 4 V +1 02/05/26, 09:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95112

  16. Oliver Hader voted on patch set 4 CR +1 V +1 02/05/26, 09:09

  17. Oli Bartsch voted on patch set 4 CR +2 V +2 02/05/26, 09:12

  18. Oli Bartsch merged patch set 5 02/05/26, 09:12