summaryrefslogtreecommitdiff
path: root/app/serializers/build_details_entity.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 /app/serializers/build_details_entity.rb
parentd4ceec9d47a7da5fa17cb6e161ac491e13fcb8bd (diff)
downloadgitlab-ce-9b58b8e363fd388635385085c58be3d4637eaa45.tar.gz
Do not allow jobs to be erased
Diffstat (limited to 'app/serializers/build_details_entity.rb')
-rw-r--r--app/serializers/build_details_entity.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb
index 8c89eea607f..69d46f5ec14 100644
--- a/app/serializers/build_details_entity.rb
+++ b/app/serializers/build_details_entity.rb
@@ -6,7 +6,7 @@ class BuildDetailsEntity < JobEntity
expose :pipeline, using: PipelineEntity
expose :erased_by, if: -> (*) { build.erased? }, using: UserEntity
- expose :erase_path, if: -> (*) { build.erasable? && can?(current_user, :update_build, project) } do |build|
+ expose :erase_path, if: -> (*) { build.erasable? && can?(current_user, :erase_build, build) } do |build|
erase_project_job_path(project, build)
end