Review 13.4 Merged

89261[TASK] Always use the current workspaceId for WSOL in DataHandler

Benni Mack CR +2 V +2 Easy +20 −13 updated 04/28/25, 19:41

Commit message

There might be scenarios where DataHandler gets initialized
with a different BE_USER, that's why it can be handed in.

However, when calling BackendUtility::workspaceOL()
it should always determine the workspaceId of THAT user.

This is not possible via BackendUtility::getRecordWSOL(),
so it is really bad to use this in DataHandler context.

For this reason, we use

  $row = BackendUtility::getRecord($table, $uid);
  BackendUtility::workspaceOL(
    $table, $row, $this->BE_USER->workspace,
  );

In the long-term we should either add a new parameter
to the method getRecordWSOL() or deprecate it.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Benni Mack commented on patch set 1 04/28/25, 19:29

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 04/28/25, 19:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78295

  3. Benni Mack voted on patch set 1 CR +2 V +2 04/28/25, 19:41

  4. Benni Mack merged patch set 2 04/28/25, 19:41