diff options
author | Unknwon <u@gogs.io> | 2015-08-14 02:43:40 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-14 02:43:40 +0800 |
commit | 817b48ed1e083b5291afd339bda573cba14bba8d (patch) | |
tree | 52a38a2c63c49afb45d45ac3fc06b3c730aa9cca /modules/middleware/context.go | |
parent | 1fb53067f478414302096d5d976a3db85df9e2eb (diff) |
Show owner/poster tags of comments and fix #1312
Diffstat (limited to 'modules/middleware/context.go')
-rw-r--r-- | modules/middleware/context.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go index 2995d578..d4bc8f03 100644 --- a/modules/middleware/context.go +++ b/modules/middleware/context.go @@ -197,6 +197,14 @@ func Contexter() macaron.Handler { ctx.Data["PageStartTime"] = time.Now() + // Check auto-signin. + if sess.Get("uid") == nil { + if _, err := AutoSignIn(ctx); err != nil { + ctx.Handle(500, "AutoSignIn", err) + return + } + } + // Get user from session if logined. ctx.User, ctx.IsBasicAuth = auth.SignedInUser(ctx.Req.Request, ctx.Session) |