aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org/team.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/org/team.go')
-rw-r--r--routers/api/v1/org/team.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go
index f9d93399ae..dbd6ccc460 100644
--- a/routers/api/v1/org/team.go
+++ b/routers/api/v1/org/team.go
@@ -131,7 +131,7 @@ func GetTeamRepos(ctx *context.APIContext) {
}
repos := make([]*api.Repository, len(team.Repos))
for i, repo := range team.Repos {
- access, err := models.AccessLevel(ctx.User, repo)
+ access, err := models.AccessLevel(ctx.User.ID, repo)
if err != nil {
ctx.Error(500, "GetTeamRepos", err)
return
@@ -161,7 +161,7 @@ func AddTeamRepository(ctx *context.APIContext) {
if ctx.Written() {
return
}
- if access, err := models.AccessLevel(ctx.User, repo); err != nil {
+ if access, err := models.AccessLevel(ctx.User.ID, repo); err != nil {
ctx.Error(500, "AccessLevel", err)
return
} else if access < models.AccessModeAdmin {
@@ -181,7 +181,7 @@ func RemoveTeamRepository(ctx *context.APIContext) {
if ctx.Written() {
return
}
- if access, err := models.AccessLevel(ctx.User, repo); err != nil {
+ if access, err := models.AccessLevel(ctx.User.ID, repo); err != nil {
ctx.Error(500, "AccessLevel", err)
return
} else if access < models.AccessModeAdmin {