Review main Merged

94880[BUGFIX] Defer BE_USER check in DataHandler::hasPageContextPermission

Oliver Hader CR +2 V +2 Easy +4 −4 updated 08/07/26, 18:44

Commit message

The BE_USER check in DataHandler::hasPageContextPermission
was performed too early, which removed the possibility to
individually skip user-level permission checks by enabling
the $bypassAccessCheckForRecords DataHandler property.

This change moves the BE_USER check back to the position it
had before the fix for issue #107432 was applied.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Thomas Maroschik +1
    • Sebastian Michaelsen +1
    • Stefan Bürk +1
    • Maik Schneider +1
    • Tobias Gaertner +1
    • Henrik Elsner +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Thomas Maroschik +1
    • Sebastian Michaelsen +1
    • Stefan Bürk +1
    • Maik Schneider +1
    • Tobias Wojtylak +1
    • Henrik Elsner +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1415

  1. Oliver Hader uploaded patch set 1 07/22/26, 11:00

  2. core-ci voted on patch set 1 V +1 07/22/26, 11:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/105159

  3. Henrik Elsner commented on patch set 1 07/22/26, 15:16

    We use a datamap migration for elements. We create a new teaser item and migrate the original bodytext of an element into the newly created teaser item. Without this patch the error message was like: [1.1]: Attempt to insert record on pages:1000004 where table "tx_teaser" is not allowed [1.2]: Attempt to modify record tt_content:1026713 failed with: ERROR: authMode "explicitAllow" failed for field "CType" with value "contentcard_vertical_one" evaluated I applied the patch and our elements where saved correctly, which solves the first error, but not the second. The original content element is still unchanged.
  4. Tobias Wojtylak voted on patch set 1 V +1 07/23/26, 10:53

  5. Thomas Maroschik voted on patch set 1 CR +1 V +1 07/23/26, 10:58

  6. Oliver Hader commented on patch set 1 07/23/26, 11:13

    Reply

    * Did that behavior already exist before https://review.typo3.org/c/Packages/TYPO3.CMS/+/94774 as merged? * Is the error `[1.2]` actually semantically correct? Or does the user/process actually have access to use the value `contentcard_vertical_one` for `tt_content.CType`? * Is the record supposed to be updated on `pid=0`?
  7. Henrik Elsner commented on patch set 1 07/28/26, 12:30

    Reply

    - it actually exists in version 13.4.32 already, so before the merge - we create a datahandler instance and set the properties admin and bypassAccessCheckForRecords to true, so there should be no restrictions - the record that causes the messages is an already existing tt_content record on a valid page record. Maybe our minimal import setup casues the issue because the pid and CType are missing in our array? we only transfer the column we want to update, not the rest - will try
  8. Maik Schneider voted on patch set 1 CR +1 V +1 08/04/26, 04:21

  9. Sebastian Michaelsen voted on patch set 1 CR +1 V +1 08/05/26, 21:31

  10. Tobias Gaertner voted on patch set 1 CR +1 08/06/26, 18:32

  11. Henrik Elsner commented on patch set 1 CR +1 V +1 08/07/26, 12:03

    We can merge this as the initial issue is solved IMHO. The other I mentioned existed before, so we patch that separately. The current one is bad and a fast solution is preferred
  12. Oliver Hader commented on patch set 1 08/07/26, 14:13

    Reply

    Acknowledged

    Reply

    Merging this would be great (another core team +1 is still required). Is there a ticket already on forge for the other pre-existing misbehavior?
  13. Stefan Bürk voted on patch set 1 CR +1 V +1 08/07/26, 14:24

  14. Oliver Hader commented on patch set 1 CR +2 V +2 08/07/26, 18:43

    Thx folks 😊
  15. Oliver Hader merged patch set 2 08/07/26, 18:44