diff options
author | Joe Chen <jc@unknwon.io> | 2023-02-08 13:55:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-08 13:55:54 +0800 |
commit | 8350daf505b837984397679f07ccc2324b4d2451 (patch) | |
tree | 19d3bd7b8dc8370a8973614a74537bddc5f618a6 /internal/context | |
parent | 133b9d90441008ee175e1f8e6369e06309e1392a (diff) |
refactor(db): merge relation stores into entity stores (#7341)
Diffstat (limited to 'internal/context')
-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 { |