-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only in case of $currentAccess the array uses the user id as index #7327
Only in case of $currentAccess the array uses the user id as index #7327
Conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Otherwise its a normal string[] with the user ids, in that case the array_merge did it's job just fine, apart from it not being deduplicated. The array+array is only needed when the user id is the key, so integer only user ids are kept as they are instead of being reindexed. Regression from 3820d68 Signed-off-by: Joas Schilling <coding@schilljs.com>
@@ -3021,7 +3132,7 @@ public function testGetAccessList() { | |||
|
|||
$this->assertSame($expected['public'], $result['public']); | |||
$this->assertSame($expected['remote'], $result['remote']); | |||
$this->assertSame(array_values($expected['users']), array_values($result['users'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hide the integer user id problem before, because we didn't even look at the user id (key) anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good and fixes the regression
Codecov Report
@@ Coverage Diff @@
## master #7327 +/- ##
============================================
+ Coverage 50.86% 50.86% +<.01%
- Complexity 24538 24539 +1
============================================
Files 1584 1584
Lines 93794 93798 +4
Branches 1358 1358
============================================
+ Hits 47705 47709 +4
Misses 46089 46089
|
@nickvergessen could you create the backport PR? |
One should be enough? |
Was not shown on mobile view :/ Sorry |
Regression from 3820d68
Before 3820d68 the method worked for
!$currentAccess
, afterwards for$currentAccess
, now it works for both and I added the relevant unit tests before.Fix #7325