Review main Merged

90271[BUGFIX] Treat page translation as page edit permission

Lisa Kreitz CR +2 V +2 Easy +8 −3 updated 08/14/25, 11:44

Commit message

If a user has no permissions to add new subpages he also
is not allowed to translate this page as the DataHandler
treats new pages automatically as subpages.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 1317

  1. Lisa Kreitz uploaded patch set 1 08/07/25, 19:56

  2. core-ci voted on patch set 1 V +1 08/07/25, 20:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82903

  3. Benni Mack updated the commit message in patch set 2 V +1 08/07/25, 21:34

  4. core-ci voted on patch set 2 V +1 08/07/25, 21:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82943

  5. Oli Bartsch commented on patch set 2 08/09/25, 07:48

    DataHandler.php:7272

    I’m not quite sure this is the right approach to fix it. When adding a translation, this is technically a NEW command. Maybe we can explore if there’s another way to differentiate this. Alternatively, we could consider introducing a dedicated permission like PAGE_NEW_TRANSLATION. Please let's have a closer look on this. Maybe @lolli@schwarzbu.ch can also have a look here.
  6. Christian Kuhn commented on patch set 2 08/13/25, 19:58

    DataHandler.php:7272 Reply

    i'll try to review & think in detail tomorrow. i'd try to not have a new permission for this, though, to not make this system more complex than it is already.
  7. Lisa Kreitz commented on patch set 2 08/14/25, 06:59

    DataHandler.php:7272 Reply

    I totally agree with both of you. I also wanted to avoid introducing a new permission. And i'm also not quite sure if this is the right approach, but would be happy to discuss over it.
  8. Christian Kuhn commented on patch set 2 08/14/25, 10:54

    DataHandler.php:7272 Reply

    I tend to agree to Lisas solution: PAGE_NEW is odd, and the easiest solution is to treat 'creating page translations' as PAGE_EDIT.
  9. Christian Kuhn uploaded patch set 3 V +1 08/14/25, 11:07

  10. Christian Kuhn commented on patch set 2 08/14/25, 11:07

    DataHandler.php:7272 Reply

    I added that decision as comment to hasPermissionToInsert().
  11. Christian Kuhn uploaded patch set 4 08/14/25, 11:10

  12. core-ci voted on patch set 3 V +1 08/14/25, 11:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83382

  13. core-ci voted on patch set 4 V +1 08/14/25, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83383

  14. Christian Kuhn voted on patch set 4 CR +1 V +1 08/14/25, 11:19

  15. Stefan Bürk voted on patch set 4 CR +2 V +2 08/14/25, 11:26

  16. Christian Kuhn voted on patch set 4 CR +2 V +2 08/14/25, 11:44

  17. Christian Kuhn merged patch set 5 08/14/25, 11:44