Review 10.4 Merged

67309[BUGFIX] Add default workspace for dummy user

Anja Leichsenring CR +2 V +2 Easy +2 −1 updated 07/22/21, 21:47

Commit message

The backend usergroup compare view requires to fetch the
group data of the groups to compare. Since this operation
depends on a user array, UserInformationService creates
such dummy user.

The dummy user array now also contains the default workspace
id `-99` to prevent triggering a database update which would
result in creating a sys log entry. This would fail since the user,
the database update should be performed on, is the dummy
user which is not fully set up.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
  • Verified V +2 Done
    • Anja Leichsenring +2
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 910

  1. Anja Leichsenring commented on patch set 1 01/06/21, 20:22

    Cherry Picked from branch master.
  2. TYPO3com voted on patch set 1 V +1 01/06/21, 20:35 Completed build in 12m 03s on Wed, 6 Jan, 08:35 PM Test Summary: 75304 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-968

  3. Anja Leichsenring voted on patch set 1 V +2 CR +2 01/06/21, 20:36

  4. Anja Leichsenring merged patch set 2 01/06/21, 20:36

  5. Ingo Fabbri commented on patch set 2 07/22/21, 18:18

    Making random changes besides (PHP_INT_MAX for whatever reason; this is no improvement to 3016 and introduces a bug) the actual bugfix is sometimes not the best idea.
  6. Oli Bartsch commented on patch set 2 07/22/21, 21:14

    Reply

    Could you please elaborate. I'm not aware of any bug, introduced by changing the user id. Also, I'm sure there are a couple of installations out there, having a user with this id defined. Since this could lead to unintended side-effects, we changed it as a precaution.
  7. Oli Bartsch commented on patch set 2 07/22/21, 21:29

    Reply

    In case you are referring to https://forge.typo3.org/issues/93894. Sure, I see the point. However, I think the problem is still that a log entry is being created. Otherwise no "Out of range" exception would be thrown. The log entry is not intended and should not happen since no user changed any workspace. This whole "dummy user" thing is IMO not solid. The functionality for fetching arbitrary user group information should be implemented differently.
  8. Ingo Fabbri commented on patch set 2 07/22/21, 21:39

    Reply

    > This whole "dummy user" thing is IMO not solid 100% agree. But as all this fetchGroupData is ancient super legacy code that noone essentially touched in over 10 years with virtually thousands of conditions. A little cousin of Datahandler.
  9. Ingo Fabbri commented on patch set 2 07/22/21, 21:42

    Reply

    Even Georg might be super afraid to refactor that piece of gold. So he came up with that dirty dummy user workaround. That was brilliant for a POC - but should have NEVER MADE it into MASTER ever. Or at least not into the LTS release. Might have been OK for a sprint release.
  10. Ingo Fabbri commented on patch set 2 07/22/21, 21:47

    Reply

    and finally: fetchGroupData is such a perfect sample of an impure function.