summaryrefslogtreecommitdiffstats
path: root/serve.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-02-25 15:28:04 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-02-25 15:28:04 +0800
commitbbf53450046f067842bb3731fad46db14333ff4c (patch)
tree73967fcdd47a55cc188a2aa88226cdb19b5abffa /serve.go
parentf7826d4ed780c29058a0825a9d821523980777de (diff)
downloadgitea-bbf53450046f067842bb3731fad46db14333ff4c.tar.gz
gitea-bbf53450046f067842bb3731fad46db14333ff4c.zip
ssh push support
Diffstat (limited to 'serve.go')
-rw-r--r--serve.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/serve.go b/serve.go
index b33b05386d..5bf44f4540 100644
--- a/serve.go
+++ b/serve.go
@@ -81,23 +81,23 @@ func runServ(*cli.Context) {
switch {
case isWrite:
- has, err := models.HasAccess(user.Name, repoName, COMMANDS_WRITE[verb])
+ has, err := models.HasAccess(user.Name, repoName, models.AU_WRITABLE)
if err != nil {
println("Inernel error:", err)
return
}
if !has {
- println("You have no right to access this repository")
+ println("You have no right to write this repository")
return
}
case isRead:
- has, err := models.HasAccess(user.Name, repoName, COMMANDS_READONLY[verb])
+ has, err := models.HasAccess(user.Name, repoName, models.AU_READABLE)
if err != nil {
println("Inernel error")
return
}
if !has {
- has, err = models.HasAccess(user.Name, repoName, COMMANDS_WRITE[verb])
+ has, err = models.HasAccess(user.Name, repoName, models.AU_WRITABLE)
if err != nil {
println("Inernel error")
return