diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-10 22:53:46 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-10 22:53:46 -0500 |
commit | 28580aee63997e04c9b8136a7a189966b8f6b666 (patch) | |
tree | a8fed76a68fbab4143ef622e17bfaba8776cf33d | |
parent | 6a23252edc36a3d99b35af69a310fd31f687f3cb (diff) |
modules/middleware/auth.go: remove uncheck login for watch a repo #929
-rw-r--r-- | modules/middleware/auth.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index b0bcd87f..3c06c69f 100644 --- a/modules/middleware/auth.go +++ b/modules/middleware/auth.go @@ -6,7 +6,6 @@ package middleware import ( "net/url" - "strings" "github.com/Unknwon/macaron" "github.com/macaron-contrib/csrf" @@ -50,10 +49,6 @@ func Toggle(options *ToggleOptions) macaron.Handler { if options.SignInRequire { if !ctx.IsSigned { - // Ignore watch repository operation. - if strings.HasSuffix(ctx.Req.RequestURI, "watch") { - return - } ctx.SetCookie("redirect_to", url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl) ctx.Redirect(setting.AppSubUrl + "/user/login") return |