#3399 500 for upstream pulls page if user has forked repository

pull/197/head
Unknwon 8 years ago
parent b73318bc62
commit 90af997fec
  1. 2
      README.md
  2. 2
      gogs.go
  3. 4
      modules/context/repo.go
  4. 2
      templates/.VERSION
  5. 2
      templates/repo/issue/list.tmpl

@ -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 |
|:-------------:|:-------:|:-------:|

@ -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())

@ -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 {

@ -1 +1 @@
0.9.67.0807
0.9.68.0807

@ -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>

Loading…
Cancel
Save