66053[BUGFIX] Return alternative group uids when aspect has no user
Commit message
Review
-
Code review CR +2 Done
- Daniel Goerz +2
- Markus Klein +1
- Xavier Perseguers +1
-
Verified V +2 Done
- Daniel Goerz +2
- Markus Klein +1
- Xavier Perseguers +1
- TYPO3com +1 CI
Issues 1
Files 2
Review log 2127
Show 12 earlier messages
-
Xavier Perseguers uploaded patch set 1 10/06/20, 09:12
-
TYPO3com voted on patch set 1 V -1 10/06/20, 09:43 Completed build in 21m 37s on Tue, 6 Oct, 09:43 AM Test Summary: 6 of 74270 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6261
-
Markus Klein commented on patch set 1 10/06/20, 09:45
-
Markus Klein commented on patch set 1 10/06/20, 09:46
UserAspectTest.php:38UnresolvedThis test is actually faulty now -
Xavier Perseguers commented on patch set 1 10/06/20, 09:47
UserAspectTest.php:213Reply Unresolvedwhy do have this stuff??? this was supposed to be a test. -
Markus Klein commented on patch set 1 10/06/20, 09:48
UserAspect.php:58UnresolvedIMO there must be proper handling if alternativeGroups = null, because $this->groups is not supposed to be null according to the type declaration -
Xavier Perseguers uploaded patch set 2 10/06/20, 09:49
-
TYPO3com voted on patch set 2 V +1 10/06/20, 10:02 Completed build in 12m 29s on Tue, 6 Oct, 10:02 AM Test Summary: 73785 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6263
-
Xavier Perseguers commented on patch set 2 10/06/20, 13:19
> Patch Set 1: > > (1 comment)UserAspect.php:58Unresolved@Markus Klein wrote in patchset 1: IMO there must be proper handling if alternativeGroups = null, because $this->groups is not supposed to be null according to the type declaration I would suggest this: ``` $this->groups = $alternativeGroups ?: [0, -1]; ``` (remaining in getter below)UserAspect.php:139the whole "else" block could logically be rewritten as this simpler code: ``` // Alternative groups are set $groups = $this->groups; if ($this->isLoggedIn()) { // If a user is logged in, always add "-2" $groups = [0, -2]; if (!empty($this->user->groupData['uid'])) { $groups = array_merge($groups, array_map('intval', $this->user->groupData['uid'])); } } ``` -
Benni Mack commented on patch set 2 10/09/20, 19:29
UserAspect.php:139Replynope. what's with "-1" then? -
Xavier Perseguers commented on patch set 2 10/10/20, 09:53
UserAspect.php:139Reply UnresolvedDefault value if you read the first comment in constructor -
Benni Mack uploaded patch set 3 10/13/20, 11:50
-
Oliver Klee commented on patch set 3 10/13/20, 11:54
Unresolved
Should this really be "as", or is the letter "h" missing (for "has")? -
TYPO3com voted on patch set 3 V -1 10/13/20, 12:16 Completed build in 21m 08s on Tue, 13 Oct, 12:16 PM Test Summary: 6 of 74201 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6470
-
Benni Mack updated the commit message in patch set 4 10/13/20, 18:57
-
Benni Mack updated the commit message in patch set 5 10/13/20, 18:58
-
TYPO3com voted on patch set 4 V -1 10/13/20, 19:22 Completed build in 24m 45s on Tue, 13 Oct, 07:22 PM Test Summary: 6 of 74201 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6499
-
TYPO3com voted on patch set 5 V -1 10/13/20, 19:24 Completed build in 26m 25s on Tue, 13 Oct, 07:24 PM Test Summary: 6 of 74201 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6500
-
Markus Klein commented on patch set 5 CR -1 10/14/20, 15:22
UserAspect.php:58Unresolvedhandle the null case: $this->groups = $alternativeGroups ?? [];UserAspect.php:157UnresolvedIf no user is present at all, we return an empty list. This is a contradiction to the unittestUserAspectTest.php:37Unresolvedcontradiction to the new implementation -
Markus Klein uploaded patch set 6 10/15/20, 13:34
-
Markus Klein voted on patch set 6 V +1 CR +1 10/15/20, 13:37
-
TYPO3com voted on patch set 6 V +1 10/15/20, 13:47 Completed build in 12m 42s on Thu, 15 Oct, 01:47 PM Test Summary: 73710 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6560
-
Benni Mack commented on patch set 6 10/15/20, 14:37
@xavier, are you fine with the change as is? -
Xavier Perseguers commented on patch set 6 V +1 CR +1 10/15/20, 15:55
Did not check the exact list of page returned but it looks to be working again. Basically, in TYPO3 v8 and in an eID script context, doing that: ``` /** @var $contentObj \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */ $contentObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); $foo = $contentObj->getTreeList(804, 99); -- 804 = some page uid ``` returned a list of subpages. In TYPO3 v9, without the patch, the list is empty, with the latest patch, the list is not empty anymore (I double checked that table cache_treelist was empty before checking). So that looks to be working again in the context of the Forge ticket (the unit test just asserts what we all know already). -
Xavier Perseguers commented on patch set 6 10/15/20, 15:56
> Patch Set 6: Verified+1 Code-Review+1 > > Did not check the exact list of page returned but it looks to be working again. Basically, in TYPO3 v8 and in an eID script context, doing that: > > ``` > /** @var $contentObj \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */ > $contentObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); > $foo = $contentObj->getTreeList(804, 99); -- 804 = some page uid > ``` > > returned a list of subpages. In TYPO3 v9, without the patch, the list is empty, with the latest patch, the list is not empty anymore (I double checked that table cache_treelist was empty before checking). > > So that looks to be working again in the context of the Forge ticket (the unit test just asserts what we all know already). But the problem exists in TYPO3 v9 as well, so you don't want to fix TYPO3 v9 anymore? -
Daniel Goerz voted on patch set 6 V +2 CR +2 10/16/20, 15:26
-
Daniel Goerz merged patch set 7 10/16/20, 15:26
UserAspectTest.php:213