Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-01-24 15:48:00 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-24 15:48:03 +0300
commit44a500ef23750c02737442ccec363ff5dd0a4988 (patch)
tree192db0cca58bd80e0061ad10f25607d7f022ed1e /spec
parent2692cee68bb961019e555168a55f729a7e125095 (diff)
Merge branch 'security-11-6-commit-status-shown-for-guest-user' into 'security-11-6'
[11.6] Stop showing ci for guest users See merge request gitlab/gitlabhq!2836 (cherry picked from commit 6390008e01ddfbbcff3b0f16f88bdd38bfcaf0ed) 75ec9ba8 Stop showing ci for guest users
Diffstat (limited to 'spec')
-rw-r--r--spec/features/dashboard/projects_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index 975b7944741..65d79db4a50 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -144,6 +144,27 @@ describe 'Dashboard Projects' do
expect(page).to have_link('Commit: passed')
end
end
+
+ context 'guest user of project and project has private pipelines' do
+ let(:guest_user) { create(:user) }
+
+ before do
+ project.update(public_builds: false)
+ project.add_guest(guest_user)
+ sign_in(guest_user)
+ end
+
+ it 'shows that the last pipeline passed' do
+ visit dashboard_projects_path
+
+ page.within('.controls') do
+ expect(page).not_to have_xpath("//a[@href='#{pipelines_project_commit_path(project, project.commit, ref: pipeline.ref)}']")
+ expect(page).not_to have_css('.ci-status-link')
+ expect(page).not_to have_css('.ci-status-icon-success')
+ expect(page).not_to have_link('Commit: passed')
+ end
+ end
+ end
end
context 'last push widget', :use_clean_rails_memory_store_caching do