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:
@@ -106,7 +106,7 @@ func GetAttachment(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
} else { // If we have the repository we check access
|
||||
perm, err := models.GetUserRepoPermission(repository, ctx.Doer)
|
||||
perm, err := models.GetUserRepoPermission(ctx, repository, ctx.Doer)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetUserRepoPermission", err.Error())
|
||||
return
|
||||
|
Reference in New Issue
Block a user