]> source.dussan.org Git - gitea.git/commitdiff
Auth problem related #80
authorUnknown <joe2010xtmf@163.com>
Wed, 16 Apr 2014 08:37:07 +0000 (04:37 -0400)
committerUnknown <joe2010xtmf@163.com>
Wed, 16 Apr 2014 08:37:07 +0000 (04:37 -0400)
routers/repo/http.go

index ab48c6f3d7b32a07e5dae1c8b5669f8972438e2b..c0009f282f9e2ed55dc2ccc559c7bad7f90c028f 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright 2014 The Gogs Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
 package repo
 
 import (
@@ -54,7 +58,7 @@ func Http(ctx *middleware.Context, params martini.Params) {
        }
 
        // only public pull don't need auth
-       var askAuth = !(!repo.IsPrivate && isPull)
+       var askAuth = !(!repo.IsPrivate && isPull) || base.Service.RequireSignInView
 
        var authUser *models.User