summaryrefslogtreecommitdiffstats
path: root/modules/middleware/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/auth.go')
-rw-r--r--modules/middleware/auth.go5
1 files changed, 5 insertions, 0 deletions
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