From f388661bda8097b5ff01548e6153c566690c9b5e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 7 Nov 2016 17:20:37 +0100 Subject: ACCESS_MODE_* -> AccessMode* --- routers/repo/http.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'routers/repo/http.go') 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 -- cgit v1.2.3