summaryrefslogtreecommitdiffstats
path: root/modules/middleware/repo.go
diff options
context:
space:
mode:
authorPeter Smit <peter@smitmail.eu>2015-02-09 13:36:33 +0200
committerPeter Smit <peter@smitmail.eu>2015-02-09 13:36:33 +0200
commit0d158e569b0c19614b5e946849e8b7a8e4a75015 (patch)
tree7702d6fbf2d26b789520f7ef9db11946797e1942 /modules/middleware/repo.go
parent4e79adf6b5bf7ec7bc3b2b47469baafd1cb0b774 (diff)
downloadgitea-0d158e569b0c19614b5e946849e8b7a8e4a75015.tar.gz
gitea-0d158e569b0c19614b5e946849e8b7a8e4a75015.zip
Change constants to UPPERCASE_WITH_UNDERSCORE style
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r--modules/middleware/repo.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 66e6f3a570..bc1d1f9692 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -64,9 +64,9 @@ func ApiRepoAssignment() macaron.Handler {
ctx.JSON(500, &base.ApiJsonErr{"AccessLevel: " + err.Error(), base.DOC_URL})
return
}
- ctx.Repo.IsOwner = mode >= models.WriteAccess
- ctx.Repo.IsAdmin = mode >= models.ReadAccess
- ctx.Repo.IsTrueOwner = mode >= models.OwnerAccess
+ ctx.Repo.IsOwner = mode >= models.ACCESS_MODE_WRITE
+ ctx.Repo.IsAdmin = mode >= models.ACCESS_MODE_READ
+ ctx.Repo.IsTrueOwner = mode >= models.ACCESS_MODE_OWNER
}
// Check access.
@@ -244,9 +244,9 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
ctx.JSON(500, &base.ApiJsonErr{"AccessLevel: " + err.Error(), base.DOC_URL})
return
}
- ctx.Repo.IsOwner = mode >= models.WriteAccess
- ctx.Repo.IsAdmin = mode >= models.ReadAccess
- ctx.Repo.IsTrueOwner = mode >= models.OwnerAccess
+ ctx.Repo.IsOwner = mode >= models.ACCESS_MODE_WRITE
+ ctx.Repo.IsAdmin = mode >= models.ACCESS_MODE_READ
+ ctx.Repo.IsTrueOwner = mode >= models.ACCESS_MODE_OWNER
}
// Check access.