From 63a294d4caa1124dd1c7d08c06ccef4113154bc8 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Thu, 4 Oct 2018 21:59:42 +0200 Subject: [PATCH] allow users with 'restart-jobs' role to restart individual builds --- src/lib/Hydra/Controller/Build.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 282fb536..3d490e06 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -493,7 +493,7 @@ sub nix : Chained('buildChain') PathPart('nix') CaptureArgs(0) { sub restart : Chained('buildChain') PathPart Args(0) { my ($self, $c) = @_; my $build = $c->stash->{build}; - requireProjectOwner($c, $build->project); + requireRestartPrivileges($c, $build->project); my $n = restartBuilds($c->model('DB')->schema, $c->model('DB::Builds')->search({ id => $build->id })); error($c, "This build cannot be restarted.") if $n != 1; $c->flash->{successMsg} = "Build has been restarted.";