diff options
author | Jason Song <i@wolfogre.com> | 2023-01-09 11:50:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 11:50:54 +0800 |
commit | 7adc2de46404e32ed33f999d308ed56232cdfea5 (patch) | |
tree | 2404a22b5fa8a941eb5bfd16fd717fab29d899e4 /services/pull/update.go | |
parent | b878155b8741c2769b6aa50a80609c36822451c9 (diff) | |
download | gitea-7adc2de46404e32ed33f999d308ed56232cdfea5.tar.gz gitea-7adc2de46404e32ed33f999d308ed56232cdfea5.zip |
Use context parameter in models/git (#22367)
After #22362, we can feel free to use transactions without
`db.DefaultContext`.
And there are still lots of models using `db.DefaultContext`, I think we
should refactor them carefully and one by one.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services/pull/update.go')
-rw-r--r-- | services/pull/update.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/update.go b/services/pull/update.go index e09dbf6244..6f976140c5 100644 --- a/services/pull/update.go +++ b/services/pull/update.go @@ -115,7 +115,7 @@ func IsUserAllowedToUpdate(ctx context.Context, pull *issues_model.PullRequest, } // Update function need push permission - if pr.ProtectedBranch != nil && !pr.ProtectedBranch.CanUserPush(user.ID) { + if pr.ProtectedBranch != nil && !pr.ProtectedBranch.CanUserPush(ctx, user.ID) { return false, false, nil } |