summaryrefslogtreecommitdiff
path: root/app/controllers/projects/artifacts_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-05-02 17:47:28 -0500
committerDouwe Maan <douwe@selenight.nl>2017-05-03 16:32:36 -0500
commitdf36f1f47b7c1dcbe6d34fabd83764ae14919e15 (patch)
tree8b24e3c77c228dce15f8082a178792103f83c502 /app/controllers/projects/artifacts_controller.rb
parent185fd98fd4cb8f920558aea3795c4e1774cd39f5 (diff)
downloadgitlab-ce-df36f1f47b7c1dcbe6d34fabd83764ae14919e15.tar.gz
Add breadcrumb, build header and pipelines submenu to artifacts browser
Diffstat (limited to 'app/controllers/projects/artifacts_controller.rb')
-rw-r--r--app/controllers/projects/artifacts_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index 59222637961..a13588b4218 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -16,7 +16,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def browse
- directory = params[:path] ? "#{params[:path]}/" : ''
+ @path = params[:path]
+ directory = @path ? "#{@path}/" : ''
@entry = build.artifacts_metadata_entry(directory)
render_404 unless @entry.exists?
@@ -60,7 +61,10 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def build
- @build ||= build_from_id || build_from_ref
+ @build ||= begin
+ build = build_from_id || build_from_ref
+ build&.present(current_user: current_user)
+ end
end
def build_from_id