- Backport of #22560
- Currently the function `GetUsersWhoCanCreateOrgRepo` uses a query that
is able to have duplicated users in the result, this is can happen under
the condition that a user is in team that either is the owner team or
has permission to create organization repositories.
- Add test code to simulate the above condition for user 3,
[`TestGetUsersWhoCanCreateOrgRepo`](a1fcb1cfb8/models/organization/org_test.go (L435)
)
is the test function that tests for this.
- The fix is quite trivial, use a map as a set to get distinct orgs.
tokarchuk/v1.18
parent
e6d6bce1f6
commit
fd2c250b52
Loading…
Reference in new issue