diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-11-06 23:24:25 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-11-06 23:24:25 +0900 |
commit | c8eb2a914b6f9348ffa16436853964998c115085 (patch) | |
tree | 0c2ba6aa3a7d664663e4af0e571e9d4a7ddda2ac /lib | |
parent | 9b58b8e363fd388635385085c58be3d4637eaa45 (diff) | |
download | gitlab-ce-c8eb2a914b6f9348ffa16436853964998c115085.tar.gz |
Fix spec. Revert update check.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/jobs.rb | 1 | ||||
-rw-r--r-- | lib/api/v3/builds.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb index a116ab3c9bd..6dcbe2ff936 100644 --- a/lib/api/jobs.rb +++ b/lib/api/jobs.rb @@ -136,6 +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? diff --git a/lib/api/v3/builds.rb b/lib/api/v3/builds.rb index fa0bef39602..1c0f9f73c78 100644 --- a/lib/api/v3/builds.rb +++ b/lib/api/v3/builds.rb @@ -169,6 +169,7 @@ module API authorize_update_builds! build = get_build!(params[:build_id]) + authorize!(:update_build, build) authorize!(:erase_build, build) return forbidden!('Build is not erasable!') unless build.erasable? |