From 28580aee63997e04c9b8136a7a189966b8f6b666 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 10 Feb 2015 22:53:46 -0500 Subject: [PATCH] modules/middleware/auth.go: remove uncheck login for watch a repo #929 --- modules/middleware/auth.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index b0bcd87f5..3c06c69f8 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