diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-03-15 01:51:46 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-03-15 01:51:46 +0100 |
commit | ec0ae5d50c59315a3c597b1cf24d4c5508c718e5 (patch) | |
tree | 6f4d6f826dd9866f9b39b66522ec629555700de2 /routers/repo/http.go | |
parent | Rename /forget_password url to /forgot_password (diff) | |
download | forgejo-ec0ae5d50c59315a3c597b1cf24d4c5508c718e5.tar.xz forgejo-ec0ae5d50c59315a3c597b1cf24d4c5508c718e5.zip |
Refactor and fix incorrect comment (#1247)
Diffstat (limited to '')
-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 |