summaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-06-28 14:58:59 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-06-28 14:58:59 +0800
commit86e2627175ceaed544dabbbef40d9197995c2bd4 (patch)
tree820eb7762ca0d3fa4f14e657a1ce2aa9f4b73617 /routers/repo/http.go
parente5ae41e21f7fa1e25f04a28d907b89c78196c824 (diff)
parentee9b7f322ff4c4c14952c2f83fb03e90fa583cad (diff)
downloadgitea-86e2627175ceaed544dabbbef40d9197995c2bd4.tar.gz
gitea-86e2627175ceaed544dabbbef40d9197995c2bd4.zip
Merge branch 'master' of github.com:gogits/gogs
Conflicts: models/update.go routers/repo/http.go
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r--routers/repo/http.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go
index 2f28742bb9..d22c0f8781 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -107,9 +107,9 @@ func Http(ctx *middleware.Context, params martini.Params) {
}
if !isPublicPull {
- var tp = models.AU_WRITABLE
+ var tp = models.WRITABLE
if isPull {
- tp = models.AU_READABLE
+ tp = models.READABLE
}
has, err := models.HasAccess(authUsername, username+"/"+reponame, tp)
@@ -117,8 +117,8 @@ func Http(ctx *middleware.Context, params martini.Params) {
ctx.Handle(401, "no basic auth and digit auth", nil)
return
} else if !has {
- if tp == models.AU_READABLE {
- has, err = models.HasAccess(authUsername, username+"/"+reponame, models.AU_WRITABLE)
+ if tp == models.READABLE {
+ has, err = models.HasAccess(authUsername, username+"/"+reponame, models.WRITABLE)
if err != nil || !has {
ctx.Handle(401, "no basic auth and digit auth", nil)
return