aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/serve.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 /cmd/serve.go
parent4e79adf6b5bf7ec7bc3b2b47469baafd1cb0b774 (diff)
downloadgitea-0d158e569b0c19614b5e946849e8b7a8e4a75015.tar.gz
gitea-0d158e569b0c19614b5e946849e8b7a8e4a75015.zip
Change constants to UPPERCASE_WITH_UNDERSCORE style
Diffstat (limited to 'cmd/serve.go')
-rw-r--r--cmd/serve.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd/serve.go b/cmd/serve.go
index d9d1a06b4e..90e1045c8e 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -59,14 +59,14 @@ func parseCmd(cmd string) (string, string) {
var (
COMMANDS_READONLY = map[string]models.AccessMode{
- "git-upload-pack": models.WriteAccess,
- "git upload-pack": models.WriteAccess,
- "git-upload-archive": models.WriteAccess,
+ "git-upload-pack": models.ACCESS_MODE_WRITE,
+ "git upload-pack": models.ACCESS_MODE_WRITE,
+ "git-upload-archive": models.ACCESS_MODE_WRITE,
}
COMMANDS_WRITE = map[string]models.AccessMode{
- "git-receive-pack": models.ReadAccess,
- "git receive-pack": models.ReadAccess,
+ "git-receive-pack": models.ACCESS_MODE_READ,
+ "git receive-pack": models.ACCESS_MODE_READ,
}
)
@@ -141,7 +141,7 @@ func runServ(k *cli.Context) {
switch {
case isWrite:
- has, err := models.HasAccess(user, repo, models.WriteAccess)
+ has, err := models.HasAccess(user, repo, models.ACCESS_MODE_WRITE)
if err != nil {
println("Gogs: internal error:", err.Error())
log.GitLogger.Fatal(2, "Fail to check write access:", err)
@@ -154,7 +154,7 @@ func runServ(k *cli.Context) {
break
}
- has, err := models.HasAccess(user, repo, models.ReadAccess)
+ has, err := models.HasAccess(user, repo, models.ACCESS_MODE_READ)
if err != nil {
println("Gogs: internal error:", err.Error())
log.GitLogger.Fatal(2, "Fail to check read access:", err)