diff options
author | Unknwon <u@gogs.io> | 2015-08-29 14:44:38 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-29 14:44:38 +0800 |
commit | 384fbeca801180c2f156e916bf69324590472e03 (patch) | |
tree | 2ffc0d2b109c11bb4e3c57f9a56992ee24bb6774 /modules/middleware/auth.go | |
parent | 63799b3c18b2511f51ccb1a985391ede641e8e93 (diff) | |
download | gitea-384fbeca801180c2f156e916bf69324590472e03.tar.gz gitea-384fbeca801180c2f156e916bf69324590472e03.zip |
#1474 logic fix
Diffstat (limited to 'modules/middleware/auth.go')
-rw-r--r-- | modules/middleware/auth.go | 4 |
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 } } |