summaryrefslogtreecommitdiff
path: root/lib/api/jobs.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-11-06 22:20:44 +0900
committerShinya Maeda <shinya@gitlab.com>2017-11-06 22:20:44 +0900
commit9b58b8e363fd388635385085c58be3d4637eaa45 (patch)
treee348f8d2cf9030d59448cea3dbc459a29bbecf95 /lib/api/jobs.rb
parentd4ceec9d47a7da5fa17cb6e161ac491e13fcb8bd (diff)
downloadgitlab-ce-9b58b8e363fd388635385085c58be3d4637eaa45.tar.gz
Do not allow jobs to be erased
Diffstat (limited to 'lib/api/jobs.rb')
-rw-r--r--lib/api/jobs.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index 3c1c412ba42..a116ab3c9bd 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -136,7 +136,7 @@ module API
authorize_update_builds!
build = find_build!(params[:job_id])
- authorize!(:update_build, build)
+ authorize!(:erase_build, build)
return forbidden!('Job is not erasable!') unless build.erasable?
build.erase(erased_by: current_user)