mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
Move permission check from ArtifactsDeleteView to the route
As suggested by @Gusted in #2431, move the permission checking from `ArtifactsDeleteView` into the route instead, where it belongs. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
b7ea2ea463
commit
9372bdd4a3
2 changed files with 1 additions and 6 deletions
|
@ -579,11 +579,6 @@ func ArtifactsView(ctx *context_module.Context) {
|
|||
}
|
||||
|
||||
func ArtifactsDeleteView(ctx *context_module.Context) {
|
||||
if !ctx.Repo.CanWrite(unit.TypeActions) {
|
||||
ctx.Error(http.StatusForbidden, "no permission")
|
||||
return
|
||||
}
|
||||
|
||||
runIndex := ctx.ParamsInt64("run")
|
||||
artifactName := ctx.Params("artifact_name")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue