aboutsummaryrefslogtreecommitdiffstats
path: root/modules/middleware/repo.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 /modules/middleware/repo.go
parent487fc8ca39a3de565fc6c67aea72c4658bbf64c8 (diff)
downloadgitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.tar.gz
gitea-e50982f5ec78c3cfa4a1cf322f7fa1a4dea44b84.zip
allow anonymous SSH clone
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r--modules/middleware/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 0aaecec84b..c14df2750e 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -41,7 +41,7 @@ func ApiRepoAssignment() macaron.Handler {
} else {
u, err = models.GetUserByName(userName)
if err != nil {
- if err == models.ErrUserNotExist {
+ if models.IsErrUserNotExist(err) {
ctx.Error(404)
} else {
ctx.JSON(500, &base.ApiJsonErr{"GetUserByName: " + err.Error(), base.DOC_URL})
@@ -217,7 +217,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
} else {
u, err = models.GetUserByName(userName)
if err != nil {
- if err == models.ErrUserNotExist {
+ if models.IsErrUserNotExist(err) {
ctx.Handle(404, "GetUserByName", err)
} else {
ctx.Handle(500, "GetUserByName", err)