]> source.dussan.org Git - gitea.git/commitdiff
modules/middleware/auth.go: remove uncheck login for watch a repo #929
authorUnknwon <joe2010xtmf@163.com>
Wed, 11 Feb 2015 03:53:46 +0000 (22:53 -0500)
committerUnknwon <joe2010xtmf@163.com>
Wed, 11 Feb 2015 03:53:46 +0000 (22:53 -0500)
modules/middleware/auth.go

index b0bcd87f54e658934ab4963225756549c0f7a826..3c06c69f8c83cfec326cc9468a0baf9764f8c183 100644 (file)
@@ -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