aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/http.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-05 11:14:17 +0800
committerUnknwon <u@gogs.io>2015-08-05 11:14:17 +0800
commite50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84 (patch)
treef6dffcf1c5a273a077a8b33c75334b9994ca02ff /routers/repo/http.go
parent487fc8ca39a3de565fc6c67aea72c4658bbf64c8 (diff)
downloadgitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.tar.gz
gitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.zip
allow anonymous SSH clone
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r--routers/repo/http.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go
index 4e5aba04e0..45b0ec59c9 100644
--- a/routers/repo/http.go
+++ b/routers/repo/http.go
@@ -55,7 +55,7 @@ func Http(ctx *middleware.Context) {
repoUser, err := models.GetUserByName(username)
if err != nil {
- if err == models.ErrUserNotExist {
+ if models.IsErrUserNotExist(err) {
ctx.Handle(404, "GetUserByName", nil)
} else {
ctx.Handle(500, "GetUserByName", err)
@@ -107,7 +107,7 @@ func Http(ctx *middleware.Context) {
authUser, err = models.UserSignIn(authUsername, authPasswd)
if err != nil {
- if err != models.ErrUserNotExist {
+ if !models.IsErrUserNotExist(err) {
ctx.Handle(500, "UserSignIn error: %v", err)
return
}