summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-06-22 08:31:28 +0000
committerValery Sizov <valery@gitlab.com>2015-06-22 08:31:28 +0000
commitfe7fea3bc8356c06730cab0fe4ce32bb96c3e33a (patch)
tree5434315eac07b76b2ccd4ea13103be776bcb1841
parentebf09aad0f32a86650e080d6832b5b124b7de0e7 (diff)
parentd53b41b47934da9784e5a981455e596a9218f72b (diff)
downloadgitlab-ci-fe7fea3bc8356c06730cab0fe4ce32bb96c3e33a.tar.gz
Merge branch 'fix_public_builds' into 'master'
Fix: show builds for public users https://gitlab.com/gitlab-org/gitlab-ci/issues/175 See merge request !154
-rw-r--r--app/views/builds/show.html.haml2
-rw-r--r--spec/features/builds_spec.rb4
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