summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-08 13:02:55 -0700
committerUnknwon <u@gogs.io>2016-08-08 13:02:55 -0700
commit90af997fecb36e5cd1863f5d724a9df7a0a04118 (patch)
treed3dbe5e8e20e33492df8f2fcae17573f10f63bb9 /modules/context
parentb73318bc62941b58064fca02b67d589718309155 (diff)
downloadgitea-90af997fecb36e5cd1863f5d724a9df7a0a04118.tar.gz
gitea-90af997fecb36e5cd1863f5d724a9df7a0a04118.zip
#3399 500 for upstream pulls page if user has forked repository
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index bc58b490eb..af18881486 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 {