summaryrefslogtreecommitdiff
path: root/lib/api/jobs.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-03-07 21:08:45 +0100
committerToon Claes <toon@gitlab.com>2017-03-07 23:45:32 +0100
commitae9218a7fd04c0d1c5b3266b43514bf34fc63d4b (patch)
tree54a87ef703e2800d4ced05e54dbdcdab2f4e347f /lib/api/jobs.rb
parent901fbda67c2c8781bb8bdb0b1a7d7869a81bc93e (diff)
downloadgitlab-ce-ae9218a7fd04c0d1c5b3266b43514bf34fc63d4b.tar.gz
Remove user_can_download_artifacts
It was actually not used anywhere.
Diffstat (limited to 'lib/api/jobs.rb')
-rw-r--r--lib/api/jobs.rb24
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index 3a1a393c940..44118522abe 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -38,8 +38,7 @@ module API
builds = user_project.builds.order('id DESC')
builds = filter_builds(builds, params[:scope])
- present paginate(builds), with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
+ present paginate(builds), with: Entities::Job
end
desc 'Get pipeline jobs' do
@@ -55,8 +54,7 @@ module API
builds = pipeline.builds
builds = filter_builds(builds, params[:scope])
- present paginate(builds), with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
+ present paginate(builds), with: Entities::Job
end
desc 'Get a specific job of a project' do
@@ -70,8 +68,7 @@ module API
build = get_build!(params[:job_id])
- present build, with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
+ present build, with: Entities::Job
end
desc 'Download the artifacts file from a job' do
@@ -138,8 +135,7 @@ module API
build.cancel
- present build, with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
+ present build, with: Entities::Job
end
desc 'Retry a specific build of a project' do
@@ -156,8 +152,7 @@ module API
build = Ci::Build.retry(build, current_user)
- present build, with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
+ present build, with: Entities::Job
end
desc 'Erase job (remove artifacts and the trace)' do
@@ -173,8 +168,7 @@ module API
return forbidden!('Job is not erasable!') unless build.erasable?
build.erase(erased_by: current_user)
- present build, with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :download_build_artifacts, user_project)
+ present build, with: Entities::Job
end
desc 'Keep the artifacts to prevent them from being deleted' do
@@ -192,8 +186,7 @@ module API
build.keep_artifacts!
status 200
- present build, with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
+ present build, with: Entities::Job
end
desc 'Trigger a manual job' do
@@ -213,8 +206,7 @@ module API
build.play(current_user)
status 200
- present build, with: Entities::Job,
- user_can_download_artifacts: can?(current_user, :read_build, user_project)
+ present build, with: Entities::Job
end
end