more context for models (#19511)

make more usage of context, to have more db transaction in one session

(make diff of  #9307 smaller)
This commit is contained in:
6543 2022-04-28 13:48:48 +02:00 committed by GitHub
parent 332b2ecd21
commit 06e4687cec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 275 additions and 245 deletions

View file

@ -215,7 +215,7 @@ func (issue *Issue) verifyReferencedIssue(stdCtx context.Context, ctx *crossRefe
// Check doer permissions; set action to None if the doer can't change the destination
if refIssue.RepoID != ctx.OrigIssue.RepoID || ref.Action != references.XRefActionNone {
perm, err := getUserRepoPermission(stdCtx, refIssue.Repo, ctx.Doer)
perm, err := GetUserRepoPermission(stdCtx, refIssue.Repo, ctx.Doer)
if err != nil {
return nil, references.XRefActionNone, err
}