1
0
Fork 0
forked from forgejo/forgejo

Final round of db.DefaultContext refactor (#27587)

Last part of #27065
This commit is contained in:
JakobDev 2023-10-14 10:37:24 +02:00 committed by GitHub
parent ae419fa494
commit 76a85a4ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 250 additions and 242 deletions

View file

@ -22,7 +22,7 @@ func AddDependency(ctx *context.Context) {
}
// Check if the Repo is allowed to have dependencies
if !ctx.Repo.CanCreateIssueDependencies(ctx.Doer, issue.IsPull) {
if !ctx.Repo.CanCreateIssueDependencies(ctx, ctx.Doer, issue.IsPull) {
ctx.Error(http.StatusForbidden, "CanCreateIssueDependencies")
return
}
@ -97,7 +97,7 @@ func RemoveDependency(ctx *context.Context) {
}
// Check if the Repo is allowed to have dependencies
if !ctx.Repo.CanCreateIssueDependencies(ctx.Doer, issue.IsPull) {
if !ctx.Repo.CanCreateIssueDependencies(ctx, ctx.Doer, issue.IsPull) {
ctx.Error(http.StatusForbidden, "CanCreateIssueDependencies")
return
}