diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-30 11:58:21 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-30 11:58:21 -0400 |
commit | 3698431fc11f740ecc043822fba8af895fc12423 (patch) | |
tree | 327c4a575bfc91253c305b7214969011950535ec /modules | |
parent | 9f91dee53fc602a939abf1219ec6ddb128c2067c (diff) | |
download | gitea-3698431fc11f740ecc043822fba8af895fc12423.tar.gz gitea-3698431fc11f740ecc043822fba8af895fc12423.zip |
Fix install bugs
Diffstat (limited to 'modules')
-rw-r--r-- | modules/middleware/auth.go | 5 |
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 |