diff options
Diffstat (limited to 'internal/context/repo.go')
-rw-r--r-- | internal/context/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/context/repo.go b/internal/context/repo.go index 55759be8..3c3462f0 100644 --- a/internal/context/repo.go +++ b/internal/context/repo.go @@ -403,7 +403,7 @@ func RepoRef() macaron.Handler { c.Data["IsViewCommit"] = c.Repo.IsViewCommit // People who have push access or have forked repository can propose a new pull request. - if c.Repo.IsWriter() || (c.IsLogged && db.Users.HasForkedRepository(c.Req.Context(), c.User.ID, c.Repo.Repository.ID)) { + if c.Repo.IsWriter() || (c.IsLogged && db.Repos.HasForkedBy(c.Req.Context(), c.Repo.Repository.ID, c.User.ID)) { // Pull request is allowed if this is a fork repository // and base repository accepts pull requests. if c.Repo.Repository.BaseRepo != nil { |