diff options
author | 6543 <6543@obermui.de> | 2022-04-28 13:48:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 13:48:48 +0200 |
commit | 06e4687cecaed41500b653e5b8685f48b8b18310 (patch) | |
tree | a98dd6d0139ba5d89c7e08d3c52930d66a77119b /modules/context/repo.go | |
parent | 332b2ecd214a79b49f3798f4f27fe02b23a17bf8 (diff) | |
download | gitea-06e4687cecaed41500b653e5b8685f48b8b18310.tar.gz gitea-06e4687cecaed41500b653e5b8685f48b8b18310.zip |
more context for models (#19511)
make more usage of context, to have more db transaction in one session
(make diff of #9307 smaller)
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 4687434455..a02bb7e869 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -285,7 +285,7 @@ func RetrieveTemplateRepo(ctx *Context, repo *repo_model.Repository) { return } - perm, err := models.GetUserRepoPermission(templateRepo, ctx.Doer) + perm, err := models.GetUserRepoPermission(ctx, templateRepo, ctx.Doer) if err != nil { ctx.ServerError("GetUserRepoPermission", err) return @@ -351,7 +351,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) { return } - ctx.Repo.Permission, err = models.GetUserRepoPermission(repo, ctx.Doer) + ctx.Repo.Permission, err = models.GetUserRepoPermission(ctx, repo, ctx.Doer) if err != nil { ctx.ServerError("GetUserRepoPermission", err) return |