From 90af997fecb36e5cd1863f5d724a9df7a0a04118 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 8 Aug 2016 13:02:55 -0700 Subject: [PATCH] #3399 500 for upstream pulls page if user has forked repository --- README.md | 2 +- gogs.go | 2 +- modules/context/repo.go | 4 ++-- templates/.VERSION | 2 +- templates/repo/issue/list.tmpl | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a593274ca..ab8457813 100644 --- 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 b41bef32d..048d61af5 100644 --- 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()) diff --git a/modules/context/repo.go b/modules/context/repo.go index bc58b490e..af1888148 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -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 { diff --git a/templates/.VERSION b/templates/.VERSION index 649c8e45f..b5a87ac24 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.67.0807 \ No newline at end of file +0.9.68.0807 \ No newline at end of file diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 5d4ed4fe5..f4208cd86 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -8,7 +8,7 @@ {{if .PageIsIssueList}} {{.i18n.Tr "repo.issues.new"}} {{else}} - {{.i18n.Tr "repo.pulls.new"}} + {{.i18n.Tr "repo.pulls.new"}} {{end}}