summaryrefslogtreecommitdiffstats
path: root/modules/middleware
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-10 05:30:07 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-10 05:30:07 -0500
commite0de6cb5adf5a81a95840f648d8a388b566202bd (patch)
tree6407a7524675e00d2a942ffa2868074dbd17b96c /modules/middleware
parentff8578082eaa356637cc24a3a09548b37aad2371 (diff)
downloadgitea-e0de6cb5adf5a81a95840f648d8a388b566202bd.tar.gz
gitea-e0de6cb5adf5a81a95840f648d8a388b566202bd.zip
work on #616 and update locales
Diffstat (limited to 'modules/middleware')
-rw-r--r--modules/middleware/context.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index 7d767b9e76..58b4f7497b 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -174,26 +174,6 @@ func Contexter() macaron.Handler {
// Get user from session if logined.
ctx.User = auth.SignedInUser(ctx.Req.Header, ctx.Session)
- // Check with basic auth again.
- if ctx.User == nil {
- baHead := ctx.Req.Header.Get("Authorization")
- auths := strings.Fields(baHead)
- if len(auths) == 2 && auths[0] == "Basic" {
- uname, passwd, _ := base.BasicAuthDecode(auths[1])
- u, err := models.GetUserByName(uname)
- if err != nil {
- if err != models.ErrUserNotExist {
- ctx.Handle(500, "GetUserByName", err)
- return
- }
- } else {
- if u.ValidtePassword(passwd) {
- ctx.User = u
- }
- }
- }
- }
-
if ctx.User != nil {
ctx.IsSigned = true
ctx.Data["IsSigned"] = ctx.IsSigned