1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
54 changed files with 275 additions and 245 deletions

View File

@@ -320,7 +320,7 @@ func ServCommand(ctx *context.PrivateContext) {
mode = perm.AccessModeRead
}
perm, err := models.GetUserRepoPermission(repo, user)
perm, err := models.GetUserRepoPermission(ctx, repo, user)
if err != nil {
log.Error("Unable to get permissions for %-v with key %d in %-v Error: %v", user, key.ID, repo, err)
ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{