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.
forgejo/models/organization
Gusted 1b53a9e914
Don't return duplicated users who can create org repo (#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 keyed by user id in order to drop
duplicates.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 year ago
..
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
mini_org.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org.go Don't return duplicated users who can create org repo (#22560) 1 year ago
org_repo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
org_test.go Don't return duplicated users who can create org repo (#22560) 1 year ago
org_user.go Rename almost all Ctx functions (#22071) 2 years ago
org_user_test.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
team.go Support org/user level projects (#22235) 1 year ago
team_invite.go Implement FSFE REUSE for golang files (#21840) 2 years ago
team_invite_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
team_list.go Support org/user level projects (#22235) 1 year ago
team_repo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
team_test.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
team_unit.go Implement FSFE REUSE for golang files (#21840) 2 years ago
team_user.go Support org/user level projects (#22235) 1 year ago