Browse Source

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

for-closed-social
Unknwon 7 years ago
parent
commit
90af997fec
5 changed files with 6 additions and 6 deletions
  1. +1
    -1
      README.md
  2. +1
    -1
      gogs.go
  3. +2
    -2
      modules/context/repo.go
  4. +1
    -1
      templates/.VERSION
  5. +1
    -1
      templates/repo/issue/list.tmpl

+ 1
- 1
README.md View File

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

+ 1
- 1
gogs.go View File

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

+ 2
- 2
modules/context/repo.go View 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 {

+ 1
- 1
templates/.VERSION View File

@ -1 +1 @@
0.9.67.0807
0.9.68.0807

+ 1
- 1
templates/repo/issue/list.tmpl View 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>

Loading…
Cancel
Save