]> source.dussan.org Git - gitea.git/commitdiff
#3399 500 for upstream pulls page if user has forked repository
authorUnknwon <u@gogs.io>
Mon, 8 Aug 2016 20:02:55 +0000 (13:02 -0700)
committerUnknwon <u@gogs.io>
Mon, 8 Aug 2016 20:02:55 +0000 (13:02 -0700)
README.md
gogs.go
modules/context/repo.go
templates/.VERSION
templates/repo/issue/list.tmpl

index a593274ca3bcb9d589dda715d13e1a5f8c512cc8..ab8457813f00f0a608f728e47ae05739b9ad7ab4 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
 
 ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
 
-##### Current tip version: 0.9.67 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
+##### Current tip version: 0.9.68 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
 
 | Web | UI  | Preview  |
 |:-------------:|:-------:|:-------:|
diff --git a/gogs.go b/gogs.go
index b41bef32d7ebb2a743c613d4326b32b292047df0..048d61af510866aab0dc1ba1ef3325c67d127cd9 100644 (file)
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
        "github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.9.67.0807"
+const APP_VER = "0.9.68.0807"
 
 func init() {
        runtime.GOMAXPROCS(runtime.NumCPU())
index bc58b490eb9d6e58ba046524a9e7f2035d0c9962..af1888148633845ebebbcc889e243ad9783c25a1 100644 (file)
@@ -275,8 +275,8 @@ func RepoAssignment(args ...bool) macaron.Handler {
                        }
                }
 
-               // People who have push access and propose a new pull request.
-               if ctx.Repo.IsWriter() {
+               // People who have push access or have fored repository can propose a new pull request.
+               if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
                        // Pull request is allowed if this is a fork repository
                        // and base repository accepts pull requests.
                        if repo.BaseRepo != nil {
index 649c8e45f7e267b1a3c577f10ea47c5c02ce7eec..b5a87ac245bcecda7cac351351bd0b9b452bc760 100644 (file)
@@ -1 +1 @@
-0.9.67.0807
\ No newline at end of file
+0.9.68.0807
\ No newline at end of file
index 5d4ed4fe512f898ce1325643384a20ff21d887b8..f4208cd86803894124e3e386e8414258e8a22e2d 100644 (file)
@@ -8,7 +8,7 @@
                                {{if .PageIsIssueList}}
                                        <a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
                                {{else}}
-                                       <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{if not .PullRequestCtx.Allowed}}#{{else}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.Repository.DefaultBranch}}...{{.PullRequestCtx.HeadInfo}}{{end}}">{{.i18n.Tr "repo.pulls.new"}}</a>
+                                       <a class="ui green button {{if not .PullRequestCtx.Allowed}}disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.Repository.DefaultBranch}}...{{.PullRequestCtx.HeadInfo}}{{end}}">{{.i18n.Tr "repo.pulls.new"}}</a>
                                {{end}}
                        </div>
                </div>