aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-07 17:20:37 +0100
committerSandro Santilli <strk@kbt.io>2016-11-07 17:20:37 +0100
commitf388661bda8097b5ff01548e6153c566690c9b5e (patch)
treed0bdf0785474f50eb42b6b4852922201620221cf /routers/repo/http.go
parent0b62aeb495c9c1daf816a754a0e4abbf8c62c2c0 (diff)
downloadgitea-f388661bda8097b5ff01548e6153c566690c9b5e.tar.gz
gitea-f388661bda8097b5ff01548e6153c566690c9b5e.zip
ACCESS_MODE_* -> AccessMode*
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 529dc3d348..5a3d331fd1 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -133,9 +133,9 @@ func HTTP(ctx *context.Context) {
}
if !isPublicPull {
- var tp = models.ACCESS_MODE_WRITE
+ var tp = models.AccessModeWrite
if isPull {
- tp = models.ACCESS_MODE_READ
+ tp = models.AccessModeRead
}
has, err := models.HasAccess(authUser, repo, tp)
@@ -143,8 +143,8 @@ func HTTP(ctx *context.Context) {
ctx.Handle(http.StatusInternalServerError, "HasAccess", err)
return
} else if !has {
- if tp == models.ACCESS_MODE_READ {
- has, err = models.HasAccess(authUser, repo, models.ACCESS_MODE_WRITE)
+ if tp == models.AccessModeRead {
+ has, err = models.HasAccess(authUser, repo, models.AccessModeWrite)
if err != nil {
ctx.Handle(http.StatusInternalServerError, "HasAccess2", err)
return