Review main Merged

89077[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
    • Oli Bartsch +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1115

  1. Benni Mack uploaded patch set 1 04/11/25, 21:50

  2. Benni Mack updated the commit message in patch set 2 04/11/25, 21:50

  3. Benni Mack marked it work in progress 04/11/25, 21:51

  4. core-ci voted on patch set 1 V +1 04/11/25, 21:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77588

  5. core-ci voted on patch set 2 V +1 04/11/25, 21:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77589

  6. Benni Mack updated the commit message in patch set 3 V +1 04/25/25, 14:14

  7. Benni Mack marked it ready for review 04/25/25, 14:14

  8. core-ci voted on patch set 3 V +1 04/25/25, 14:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78185

  9. Stefan Bürk updated the commit message in patch set 4 V +1 04/27/25, 14:00

  10. Stefan Bürk voted on patch set 4 CR +1 04/27/25, 14:01

  11. core-ci voted on patch set 4 V +1 04/27/25, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78231

  12. Stefan Bürk voted on patch set 4 V +1 04/27/25, 15:19

  13. Oli Bartsch voted on patch set 4 CR +1 V +1 04/28/25, 15:15

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

  15. Benni Mack merged patch set 5 04/28/25, 19:41