mirror of
https://github.com/gogs/gogs.git
synced 2026-05-28 21:30:36 +00:00
refactor(db): merge relation stores into entity stores (#7341)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user