forgejo/models/organization
Gusted fd2c250b52
Don't return duplicated users who can create org repo (#22560) (#22562)
- 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.
2023-01-30 16:59:20 +00:00
..
main_test.go
mini_org.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
org.go Don't return duplicated users who can create org repo (#22560) (#22562) 2023-01-30 16:59:20 +00:00
org_repo.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
org_test.go Don't return duplicated users who can create org repo (#22560) (#22562) 2023-01-30 16:59:20 +00:00
org_user.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
org_user_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
team.go Add team member invite by email (#20307) 2022-10-19 14:40:28 +02:00
team_invite.go Add team member invite by email (#20307) 2022-10-19 14:40:28 +02:00
team_invite_test.go Add team member invite by email (#20307) 2022-10-19 14:40:28 +02:00
team_repo.go
team_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
team_unit.go
team_user.go