From: Unknwon Date: Wed, 11 Feb 2015 03:53:46 +0000 (-0500) Subject: modules/middleware/auth.go: remove uncheck login for watch a repo #929 X-Git-Tag: v0.9.99~1468 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=28580aee63997e04c9b8136a7a189966b8f6b666;p=gitea.git modules/middleware/auth.go: remove uncheck login for watch a repo #929 --- diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index b0bcd87f54..3c06c69f8c 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