summaryrefslogtreecommitdiff
path: root/spec/features/security
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:07:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:07:48 +0000
commite72386771751fb22245bc6604fef236a2ee130cb (patch)
tree7cf54bca933159cb177d3caa2f139f87d6d30391 /spec/features/security
parentc2b98d3dbd47ab92c79c702276fe9130d9a28036 (diff)
downloadgitlab-ce-e72386771751fb22245bc6604fef236a2ee130cb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/security')
-rw-r--r--spec/features/security/group/internal_access_spec.rb1
-rw-r--r--spec/features/security/group/private_access_spec.rb1
-rw-r--r--spec/features/security/group/public_access_spec.rb1
-rw-r--r--spec/features/security/project/internal_access_spec.rb7
-rw-r--r--spec/features/security/project/private_access_spec.rb7
-rw-r--r--spec/features/security/project/public_access_spec.rb6
6 files changed, 23 insertions, 0 deletions
diff --git a/spec/features/security/group/internal_access_spec.rb b/spec/features/security/group/internal_access_spec.rb
index a182b6b9d57..8dd15789cd1 100644
--- a/spec/features/security/group/internal_access_spec.rb
+++ b/spec/features/security/group/internal_access_spec.rb
@@ -53,6 +53,7 @@ describe 'Internal Group access' do
describe 'GET /groups/:path/merge_requests' do
let(:project) { create(:project, :internal, :repository, group: group) }
+
subject { merge_requests_group_path(group) }
it { is_expected.to be_allowed_for(:admin) }
diff --git a/spec/features/security/group/private_access_spec.rb b/spec/features/security/group/private_access_spec.rb
index 5e3e9824aaa..0720302b03b 100644
--- a/spec/features/security/group/private_access_spec.rb
+++ b/spec/features/security/group/private_access_spec.rb
@@ -53,6 +53,7 @@ describe 'Private Group access' do
describe 'GET /groups/:path/merge_requests' do
let(:project) { create(:project, :private, :repository, group: group) }
+
subject { merge_requests_group_path(group) }
it { is_expected.to be_allowed_for(:admin) }
diff --git a/spec/features/security/group/public_access_spec.rb b/spec/features/security/group/public_access_spec.rb
index efc84205980..0a18a0ff812 100644
--- a/spec/features/security/group/public_access_spec.rb
+++ b/spec/features/security/group/public_access_spec.rb
@@ -53,6 +53,7 @@ describe 'Public Group access' do
describe 'GET /groups/:path/merge_requests' do
let(:project) { create(:project, :public, :repository, group: group) }
+
subject { merge_requests_group_path(group) }
it { is_expected.to be_allowed_for(:admin) }
diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb
index 20a320e5b92..5c74b566ef0 100644
--- a/spec/features/security/project/internal_access_spec.rb
+++ b/spec/features/security/project/internal_access_spec.rb
@@ -129,6 +129,7 @@ describe "Internal Project Access" do
describe "GET /:project_path/blob" do
let(:commit) { project.repository.commit }
+
subject { project_blob_path(project, File.join(commit.id, '.gitignore')) }
it { is_expected.to be_allowed_for(:admin) }
@@ -186,6 +187,7 @@ describe "Internal Project Access" do
describe "GET /:project_path/issues/:id/edit" do
let(:issue) { create(:issue, project: project) }
+
subject { edit_project_issue_path(project, issue) }
it { is_expected.to be_allowed_for(:admin) }
@@ -327,6 +329,7 @@ describe "Internal Project Access" do
describe "GET /:project_path/pipelines/:id" do
let(:pipeline) { create(:ci_pipeline, project: project) }
+
subject { project_pipeline_path(project, pipeline) }
it { is_expected.to be_allowed_for(:admin) }
@@ -379,6 +382,7 @@ describe "Internal Project Access" do
describe "GET /:project_path/builds/:id" do
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) }
+
subject { project_job_path(project, build.id) }
context "when allowed for public and internal" do
@@ -417,6 +421,7 @@ describe "Internal Project Access" do
describe 'GET /:project_path/builds/:id/trace' do
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) }
+
subject { trace_project_job_path(project, build.id) }
context 'when allowed for public and internal' do
@@ -482,6 +487,7 @@ describe "Internal Project Access" do
describe "GET /:project_path/-/environments/:id" do
let(:environment) { create(:environment, project: project) }
+
subject { project_environment_path(project, environment) }
it { is_expected.to be_allowed_for(:admin) }
@@ -497,6 +503,7 @@ describe "Internal Project Access" do
describe "GET /:project_path/-/environments/:id/deployments" do
let(:environment) { create(:environment, project: project) }
+
subject { project_environment_deployments_path(project, environment) }
it { is_expected.to be_allowed_for(:admin) }
diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb
index 62f9a96305d..2404b7cc69d 100644
--- a/spec/features/security/project/private_access_spec.rb
+++ b/spec/features/security/project/private_access_spec.rb
@@ -129,6 +129,7 @@ describe "Private Project Access" do
describe "GET /:project_path/blob" do
let(:commit) { project.repository.commit }
+
subject { project_blob_path(project, File.join(commit.id, '.gitignore')) }
it { is_expected.to be_allowed_for(:admin) }
@@ -186,6 +187,7 @@ describe "Private Project Access" do
describe "GET /:project_path/issues/:id/edit" do
let(:issue) { create(:issue, project: project) }
+
subject { edit_project_issue_path(project, issue) }
it { is_expected.to be_allowed_for(:admin) }
@@ -311,6 +313,7 @@ describe "Private Project Access" do
describe "GET /:project_path/pipelines/:id" do
let(:pipeline) { create(:ci_pipeline, project: project) }
+
subject { project_pipeline_path(project, pipeline) }
it { is_expected.to be_allowed_for(:admin) }
@@ -365,6 +368,7 @@ describe "Private Project Access" do
describe "GET /:project_path/builds/:id" do
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) }
+
subject { project_job_path(project, build.id) }
it { is_expected.to be_allowed_for(:admin) }
@@ -398,6 +402,7 @@ describe "Private Project Access" do
describe 'GET /:project_path/builds/:id/trace' do
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) }
+
subject { trace_project_job_path(project, build.id) }
it { is_expected.to be_allowed_for(:admin) }
@@ -443,6 +448,7 @@ describe "Private Project Access" do
describe "GET /:project_path/-/environments/:id" do
let(:environment) { create(:environment, project: project) }
+
subject { project_environment_path(project, environment) }
it { is_expected.to be_allowed_for(:admin) }
@@ -458,6 +464,7 @@ describe "Private Project Access" do
describe "GET /:project_path/-/environments/:id/deployments" do
let(:environment) { create(:environment, project: project) }
+
subject { project_environment_deployments_path(project, environment) }
it { is_expected.to be_allowed_for(:admin) }
diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb
index 317c7bae084..8e07af61c8b 100644
--- a/spec/features/security/project/public_access_spec.rb
+++ b/spec/features/security/project/public_access_spec.rb
@@ -143,6 +143,7 @@ describe "Public Project Access" do
describe "GET /:project_path/pipelines/:id" do
let(:pipeline) { create(:ci_pipeline, project: project) }
+
subject { project_pipeline_path(project, pipeline) }
it { is_expected.to be_allowed_for(:admin) }
@@ -195,6 +196,7 @@ describe "Public Project Access" do
describe "GET /:project_path/builds/:id" do
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) }
+
subject { project_job_path(project, build.id) }
context "when allowed for public" do
@@ -233,6 +235,7 @@ describe "Public Project Access" do
describe 'GET /:project_path/builds/:id/trace' do
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) }
+
subject { trace_project_job_path(project, build.id) }
context 'when allowed for public' do
@@ -298,6 +301,7 @@ describe "Public Project Access" do
describe "GET /:project_path/-/environments/:id" do
let(:environment) { create(:environment, project: project) }
+
subject { project_environment_path(project, environment) }
it { is_expected.to be_allowed_for(:admin) }
@@ -313,6 +317,7 @@ describe "Public Project Access" do
describe "GET /:project_path/-/environments/:id/deployments" do
let(:environment) { create(:environment, project: project) }
+
subject { project_environment_deployments_path(project, environment) }
it { is_expected.to be_allowed_for(:admin) }
@@ -399,6 +404,7 @@ describe "Public Project Access" do
describe "GET /:project_path/issues/:id/edit" do
let(:issue) { create(:issue, project: project) }
+
subject { edit_project_issue_path(project, issue) }
it { is_expected.to be_allowed_for(:admin) }