Review main Merged

63794[TASK] Set pseudo user when simulating a user group

Susi Moog CR +2 V +2 Easy +15 −3 updated 03/24/20, 07:51

Commit message

Simulating a user group had no user set, which resulted in some things
not being simulated (for example the fluid `role` and `authenticated`
view helpers).

As the expectation just includes a `uid` > 0, we are now setting
`uid=1` for the simulated user. However, the long term solution for
future versions should be replacing the usergroup simulation by a
simulation of a concrete user (like impersonating is done in the
backend).

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Henrik Ziegenhain +1
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1215

  1. Susi Moog uploaded patch set 1 03/19/20, 12:23

  2. Georg Ringer commented on patch set 1 03/19/20, 12:27

    PreviewModule.php:202 Unresolved

    I propose something like 9999 because in some edge cases where people debug that it is more visible that this is faked
  3. TYPO3com voted on patch set 1 V -1 03/19/20, 12:44 Completed build in 19m 32s on Thu, 19 Mar, 12:43 PM Test Summary: 6 of 72592 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1444

  4. Susi Moog uploaded patch set 2 03/19/20, 12:53

  5. TYPO3com voted on patch set 2 V +1 03/19/20, 13:08 Completed build in 14m 29s on Thu, 19 Mar, 01:08 PM Test Summary: 72108 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1448

  6. Henrik Ziegenhain commented on patch set 2 03/19/20, 20:35

    > Patch Set 1: > > (1 comment)

    PreviewModule.php:199

    Could not get this attribute. Argument 1 passed to TYPO3\CMS\Core\Context\UserAspect::__construct() must be an instance of TYPO3\CMS\Core\Authentication\AbstractUserAuthentication or null, instance of stdClass given, called in typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3681
  7. Susi Moog commented on patch set 2 03/21/20, 07:21

    PreviewModule.php:199 Reply

    hmm, I seem unable to reproduce that error. Do you have a stack trace?
  8. Henrik Ziegenhain commented on patch set 2 03/22/20, 06:21

    PreviewModule.php:199 Reply

    Tested it with v9 - I think this could be the problem?! I permanently got errors on cherry-picking
  9. Susi Moog commented on patch set 2 03/22/20, 08:25

    PreviewModule.php:199 Reply Unresolved

    ah, true that could indeed be the reason. I'll add the backport for v9 to my list so you can test that there (but might take some time)
  10. Daniel Goerz commented on patch set 3 03/23/20, 15:27

    Published edit on patch set 2.
  11. TYPO3com voted on patch set 3 V +1 03/23/20, 15:44 Completed build in 16m 26s on Mon, 23 Mar, 03:44 PM Test Summary: 72225 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1631

  12. Henrik Ziegenhain voted on patch set 3 CR +1 03/24/20, 04:19

  13. Benni Mack voted on patch set 3 V +1 CR +1 03/24/20, 07:50

  14. Daniel Goerz voted on patch set 3 V +2 CR +2 03/24/20, 07:51

  15. Daniel Goerz merged patch set 4 03/24/20, 07:51