diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-06-22 11:29:54 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-06-22 11:50:16 +0200 |
commit | 650c3daa2ea752313d65d5852016ab46418a964a (patch) | |
tree | 168e331cf1969966fafce58315f87472b1e1be65 | |
parent | 9f95319f38fc63f0d8d46720bfe974d6dab2e254 (diff) | |
download | gitlab-ci-650c3daa2ea752313d65d5852016ab46418a964a.tar.gz |
Fix: show builds for public users
-rw-r--r-- | app/views/builds/show.html.haml | 2 | ||||
-rw-r--r-- | spec/features/builds_spec.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/views/builds/show.html.haml b/app/views/builds/show.html.haml index 158ec27..5ddaa3c 100644 --- a/app/views/builds/show.html.haml +++ b/app/views/builds/show.html.haml @@ -104,7 +104,7 @@ #{time_ago_in_words(@build.finished_at)} ago %p %span.attr-name Runner: - - if @build.runner && current_user.is_admin + - if @build.runner && current_user && current_user.is_admin \#{link_to "##{@build.runner.id}", admin_runner_path(@build.runner.id)} - elsif @build.runner \##{@build.runner.id} diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index d8ad0ce..fcd7996 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -45,7 +45,9 @@ describe "Builds" do before do @project = FactoryGirl.create :public_project @commit = FactoryGirl.create :commit, project: @project - @build = FactoryGirl.create :build, commit: @commit + @runner = FactoryGirl.create :specific_runner + @build = FactoryGirl.create :build, commit: @commit, runner: @runner + stub_gitlab_calls visit project_build_path(@project, @build) end |