aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-02-01 20:09:24 +0100
committerGitHub <noreply@github.com>2022-02-01 14:09:24 -0500
commitd3b31cc1ee752e09e3062213eb4c34a6e9b0d7ff (patch)
treecfd1545886a9d4e0264fe60e496c1f8839efb7ae /modules
parentf6f4e1ddb97227f1d0f2213b6dc9201f302568cf (diff)
downloadgitea-d3b31cc1ee752e09e3062213eb4c34a6e9b0d7ff.tar.gz
gitea-d3b31cc1ee752e09e3062213eb4c34a6e9b0d7ff.zip
Add `GetUserTeams` (#18499)
* COrrect use `UserID` in `SearchTeams` - Use `UserID` in the `SearchTeams` function, currently it was useless to pass such information. Now it does a INNER statement to `team_user` which obtains UserID -> TeamID data. - Make OrgID optional. - Resolves #18484 * Seperate searching specific user * Add condition back * Use correct struct type Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/repository/create_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/repository/create_test.go b/modules/repository/create_test.go
index ed890ace43..4e232a8609 100644
--- a/modules/repository/create_test.go
+++ b/modules/repository/create_test.go
@@ -23,7 +23,7 @@ func TestIncludesAllRepositoriesTeams(t *testing.T) {
testTeamRepositories := func(teamID int64, repoIds []int64) {
team := unittest.AssertExistsAndLoadBean(t, &models.Team{ID: teamID}).(*models.Team)
- assert.NoError(t, team.GetRepositories(&models.SearchTeamOptions{}), "%s: GetRepositories", team.Name)
+ assert.NoError(t, team.GetRepositories(&models.SearchOrgTeamOptions{}), "%s: GetRepositories", team.Name)
assert.Len(t, team.Repos, team.NumRepos, "%s: len repo", team.Name)
assert.Len(t, team.Repos, len(repoIds), "%s: repo count", team.Name)
for i, rid := range repoIds {