Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'fix_public_builds' into 'master'
Browse files Browse the repository at this point in the history
Fix: show builds for public users

https://gitlab.com/gitlab-org/gitlab-ci/issues/175

See merge request !154
  • Loading branch information
vsizov committed Jun 22, 2015
2 parents ebf09aa + d53b41b commit fe7fea3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/builds/show.html.haml
Expand Up @@ -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}
Expand Down
4 changes: 3 additions & 1 deletion spec/features/builds_spec.rb
Expand Up @@ -45,7 +45,9 @@
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
Expand Down

0 comments on commit fe7fea3

Please sign in to comment.