gitea/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 Move tests as seperate sub packages to reduce duplicated file names (#19951) 2022-06-15 09:02:00 +02:00
mini_org.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08: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_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08: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.go Don't return duplicated users who can create org repo (#22560) (#22562) 2023-01-30 16:59:20 +00:00
team_invite_test.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_repo.go Add order by for assignee no sort issue (#20053) 2022-07-14 18:00:10 +02:00
team_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
team_unit.go Move organization related structs into sub package (#18518) 2022-03-29 14:29:02 +08:00
team_user.go Make git.OpenRepository accept Context (#19260) 2022-03-30 03:13:41 +08:00
team.go Add team member invite by email (#20307) 2022-10-19 14:40:28 +02:00