diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-03-14 20:51:46 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-03-15 08:51:46 +0800 |
commit | ec0ae5d50c59315a3c597b1cf24d4c5508c718e5 (patch) | |
tree | 6f4d6f826dd9866f9b39b66522ec629555700de2 /routers/repo/http.go | |
parent | 7d8f9d1c46e38681f2a4033a7da811ab7562d953 (diff) | |
download | gitea-ec0ae5d50c59315a3c597b1cf24d4c5508c718e5.tar.gz gitea-ec0ae5d50c59315a3c597b1cf24d4c5508c718e5.zip |
Refactor and fix incorrect comment (#1247)
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r-- | routers/repo/http.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go index dc29651847..12fcbcfb3f 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -152,13 +152,13 @@ func HTTP(ctx *context.Context) { } if !isPublicPull { - has, err := models.HasAccess(authUser, repo, accessMode) + has, err := models.HasAccess(authUser.ID, repo, accessMode) if err != nil { ctx.Handle(http.StatusInternalServerError, "HasAccess", err) return } else if !has { if accessMode == models.AccessModeRead { - has, err = models.HasAccess(authUser, repo, models.AccessModeWrite) + has, err = models.HasAccess(authUser.ID, repo, models.AccessModeWrite) if err != nil { ctx.Handle(http.StatusInternalServerError, "HasAccess2", err) return |