aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-02-23 16:15:25 -0500
committerUnknwon <u@gogs.io>2017-02-23 16:15:25 -0500
commitb78e03934d057bdb4c628fefb364dda6eb1f260a (patch)
tree79fe27f1a575f088a45b658709dac1f07eb0e9fc /routers/api/v1/api.go
parent3c0d162961d3704c5a98f0f0606fbb95971db358 (diff)
models/access: hasAccess only need userID not user object
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 2ab1af3d..d883d6c0 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -65,7 +65,7 @@ func repoAssignment() macaron.Handler {
if ctx.IsSigned && ctx.User.IsAdmin {
ctx.Repo.AccessMode = models.ACCESS_MODE_OWNER
} else {
- mode, err := models.AccessLevel(ctx.User, repo)
+ mode, err := models.AccessLevel(ctx.User.ID, repo)
if err != nil {
ctx.Error(500, "AccessLevel", err)
return