summaryrefslogtreecommitdiffstats
path: root/modules/middleware/auth.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-29 14:44:38 +0800
committerUnknwon <u@gogs.io>2015-08-29 14:44:38 +0800
commit384fbeca801180c2f156e916bf69324590472e03 (patch)
tree2ffc0d2b109c11bb4e3c57f9a56992ee24bb6774 /modules/middleware/auth.go
parent63799b3c18b2511f51ccb1a985391ede641e8e93 (diff)
downloadgitea-384fbeca801180c2f156e916bf69324590472e03.tar.gz
gitea-384fbeca801180c2f156e916bf69324590472e03.zip
#1474 logic fix
Diffstat (limited to 'modules/middleware/auth.go')
-rw-r--r--modules/middleware/auth.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go
index f607460037..68d74e8764 100644
--- a/modules/middleware/auth.go
+++ b/modules/middleware/auth.go
@@ -119,7 +119,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
func ApiReqToken() macaron.Handler {
return func(ctx *Context) {
if !ctx.IsSigned {
- ctx.Error(403)
+ ctx.Error(401)
return
}
}
@@ -128,7 +128,7 @@ func ApiReqToken() macaron.Handler {
func ApiReqBasicAuth() macaron.Handler {
return func(ctx *Context) {
if !ctx.IsBasicAuth {
- ctx.Error(403)
+ ctx.Error(401)
return
}
}