From 3698431fc11f740ecc043822fba8af895fc12423 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 30 Mar 2014 11:58:21 -0400 Subject: Fix install bugs --- modules/middleware/auth.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/middleware/auth.go') diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index 64f75d75cf..f50fde99e5 100644 --- a/modules/middleware/auth.go +++ b/modules/middleware/auth.go @@ -21,6 +21,11 @@ type ToggleOptions struct { func Toggle(options *ToggleOptions) martini.Handler { return func(ctx *Context) { + if !base.InstallLock { + ctx.Redirect("/install") + return + } + if options.SignOutRequire && ctx.IsSigned && ctx.Req.RequestURI != "/" { ctx.Redirect("/") return -- cgit v1.2.3