diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-11-14 10:54:30 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-11-14 10:54:30 +0000 |
commit | 6b01821b0d7c7c624ab86936a7cadb82b3603630 (patch) | |
tree | 22027af01434dddcf507a48a9e12d05b86ff4953 /app/serializers | |
parent | 6b9b516007c8dda88f33e9603a6880e3fc3ff103 (diff) | |
parent | 8029c92e1c81e4c9ab55704bff82cca5ff893a03 (diff) | |
download | gitlab-ce-6b01821b0d7c7c624ab86936a7cadb82b3603630.tar.gz |
Merge branch 'fix/sm/31771-do-not-allow-jobs-to-be-erased-new' into 'master'
Do not allow jobs to be erased
Closes #31771
See merge request gitlab-org/gitlab-ce!15216
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/build_details_entity.rb | 2 |
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 |