diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-11 19:25:59 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-11 19:25:59 -0500 |
commit | c5c467a9cd805c7cd0fb93f467e0205ee082cca3 (patch) | |
tree | b4e617b52918b38e589ec2221eaf2bededd23f79 /modules/middleware/auth.go | |
parent | c7a042ef3682fce9f343faf5e8d3e4228feabb96 (diff) | |
parent | 0af74b36add865445ed1d6cd649910d8bb82fe5e (diff) |
Merge branch 'dev' of github.com:gogits/gogs into access
Diffstat (limited to 'modules/middleware/auth.go')
-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 |