summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-30 11:58:21 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-30 11:58:21 -0400
commit3698431fc11f740ecc043822fba8af895fc12423 (patch)
tree327c4a575bfc91253c305b7214969011950535ec /modules
parent9f91dee53fc602a939abf1219ec6ddb128c2067c (diff)
downloadgitea-3698431fc11f740ecc043822fba8af895fc12423.tar.gz
gitea-3698431fc11f740ecc043822fba8af895fc12423.zip
Fix install bugs
Diffstat (limited to 'modules')
-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