You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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.
2 years ago
..
main_test.go Move tests as seperate sub packages to reduce duplicated file names (#19951) 3 years ago
mini_org.go Move some files into models' sub packages (#20262) 3 years ago
org.go Don't return duplicated users who can create org repo (#22560) (#22562) 2 years ago
org_repo.go Move some files into models' sub packages (#20262) 3 years ago
org_test.go Don't return duplicated users who can create org repo (#22560) (#22562) 2 years ago
org_user.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
org_user_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 3 years ago
team.go Add team member invite by email (#20307) 2 years ago
team_invite.go Add team member invite by email (#20307) 2 years ago
team_invite_test.go Add team member invite by email (#20307) 2 years ago
team_repo.go Add order by for assignee no sort issue (#20053) 3 years ago
team_test.go Refactor AssertExistsAndLoadBean to use generics (#20797) 3 years ago
team_unit.go Move organization related structs into sub package (#18518) 3 years ago
team_user.go Make git.OpenRepository accept Context (#19260) 3 years ago