diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-05 21:04:42 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-04-05 21:04:42 +0000 |
commit | d54cf868f81ca957c8322661b11e6755d9ea5a85 (patch) | |
tree | 39ef104a65a13fc41a5fcc3a79b9e1ec9c154d3d /app/controllers | |
parent | dd271e246001a06609592eef109d154291305d32 (diff) | |
download | gitlab-ce-d54cf868f81ca957c8322661b11e6755d9ea5a85.tar.gz |
Resolve "Show `failure_reason` and upgrade tooltips of jobs"
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/jobs_controller.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb index ac9eb2047a0..dd12d30a085 100644 --- a/app/controllers/projects/jobs_controller.rb +++ b/app/controllers/projects/jobs_controller.rb @@ -2,7 +2,6 @@ class Projects::JobsController < Projects::ApplicationController include SendFileUpload before_action :build, except: [:index, :cancel_all] - before_action :authorize_read_build!, only: [:index, :show, :status, :raw, :trace] before_action :authorize_update_build!, @@ -45,8 +44,11 @@ class Projects::JobsController < Projects::ApplicationController end def show - @builds = @project.pipelines.find_by_sha(@build.sha).builds.order('id DESC') - @builds = @builds.where("id not in (?)", @build.id) + @builds = @project.pipelines + .find_by_sha(@build.sha) + .builds + .order('id DESC') + .present(current_user: current_user) @pipeline = @build.pipeline respond_to do |format| |