forked from hinterland/hearth
feat: vendor gitea 1.16.2
This commit is contained in:
@@ -55,9 +55,9 @@ func AddDependency(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
// Can ctx.Doer read issues in the dep repo?
|
||||
depRepoPerm, err := access_model.GetUserRepoPermission(ctx, dep.Repo, ctx.Doer)
|
||||
depRepoPerm, err := access_model.GetDoerRepoPermission(ctx, dep.Repo, ctx.Doer)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetUserRepoPermission", err)
|
||||
ctx.ServerError("GetDoerRepoPermission", err)
|
||||
return
|
||||
}
|
||||
if !depRepoPerm.CanReadIssuesOrPulls(dep.IsPull) {
|
||||
@@ -119,7 +119,7 @@ func RemoveDependency(ctx *context.Context) {
|
||||
case "blocking":
|
||||
depType = issues_model.DependencyTypeBlocking
|
||||
default:
|
||||
ctx.HTTPError(http.StatusBadRequest, "GetDependecyType")
|
||||
ctx.HTTPError(http.StatusBadRequest, "GetDependencyType")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user