aboutsummaryrefslogtreecommitdiffstats
path: root/modules/middleware/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/context.go')
-rw-r--r--modules/middleware/context.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index cbc0b0cf3c..fb33c48e0e 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -34,8 +34,9 @@ type Context struct {
Flash *session.Flash
Session session.Store
- User *models.User
- IsSigned bool
+ User *models.User
+ IsSigned bool
+ IsBasicAuth bool
Repo struct {
IsOwner bool
@@ -172,7 +173,7 @@ func Contexter() macaron.Handler {
ctx.Data["PageStartTime"] = time.Now()
// Get user from session if logined.
- ctx.User = auth.SignedInUser(ctx.Req.Request, ctx.Session)
+ ctx.User, ctx.IsBasicAuth = auth.SignedInUser(ctx.Req.Request, ctx.Session)
if ctx.User != nil {
ctx.IsSigned = true