diff options
Diffstat (limited to 'spec/controllers/projects')
44 files changed, 98 insertions, 98 deletions
diff --git a/spec/controllers/projects/avatars_controller_spec.rb b/spec/controllers/projects/avatars_controller_spec.rb index acfa2730d94..17c9a61f339 100644 --- a/spec/controllers/projects/avatars_controller_spec.rb +++ b/spec/controllers/projects/avatars_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::AvatarsController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) controller.instance_variable_set(:@project, project) end diff --git a/spec/controllers/projects/badges_controller_spec.rb b/spec/controllers/projects/badges_controller_spec.rb index e7cddf8cfbf..dfe34171b55 100644 --- a/spec/controllers/projects/badges_controller_spec.rb +++ b/spec/controllers/projects/badges_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::BadgesController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/blame_controller_spec.rb b/spec/controllers/projects/blame_controller_spec.rb index 88d4f4e9cd0..fe4c4863717 100644 --- a/spec/controllers/projects/blame_controller_spec.rb +++ b/spec/controllers/projects/blame_controller_spec.rb @@ -7,7 +7,7 @@ describe Projects::BlameController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) controller.instance_variable_set(:@project, project) end diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb index 4dcb7dc6c87..32cd7c6e70a 100644 --- a/spec/controllers/projects/blob_controller_spec.rb +++ b/spec/controllers/projects/blob_controller_spec.rb @@ -108,7 +108,7 @@ describe Projects::BlobController do end before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -230,12 +230,12 @@ describe Projects::BlobController do end end - context 'as master' do - let(:master) { create(:user) } + context 'as maintainer' do + let(:maintainer) { create(:user) } before do - project.add_master(master) - sign_in(master) + project.add_maintainer(maintainer) + sign_in(maintainer) get :edit, default_params end @@ -263,7 +263,7 @@ describe Projects::BlobController do end before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/boards_controller_spec.rb b/spec/controllers/projects/boards_controller_spec.rb index 509f19ed030..096efc1c7b2 100644 --- a/spec/controllers/projects/boards_controller_spec.rb +++ b/spec/controllers/projects/boards_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::BoardsController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb index 4860ea5dcce..31471cde420 100644 --- a/spec/controllers/projects/branches_controller_spec.rb +++ b/spec/controllers/projects/branches_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::BranchesController do let(:developer) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) project.add_developer(user) allow(project).to receive(:branches).and_return(['master', 'foo/bar/baz']) diff --git a/spec/controllers/projects/clusters/applications_controller_spec.rb b/spec/controllers/projects/clusters/applications_controller_spec.rb index 99fdff5f846..9e17e392d3d 100644 --- a/spec/controllers/projects/clusters/applications_controller_spec.rb +++ b/spec/controllers/projects/clusters/applications_controller_spec.rb @@ -17,7 +17,7 @@ describe Projects::Clusters::ApplicationsController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -70,7 +70,7 @@ describe Projects::Clusters::ApplicationsController do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb index e47ccdc9aea..42917d0d505 100644 --- a/spec/controllers/projects/clusters_controller_spec.rb +++ b/spec/controllers/projects/clusters_controller_spec.rb @@ -11,7 +11,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -61,7 +61,7 @@ describe Projects::ClustersController do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -79,7 +79,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -142,7 +142,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -156,7 +156,7 @@ describe Projects::ClustersController do describe 'security' do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -185,7 +185,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -236,7 +236,7 @@ describe Projects::ClustersController do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -267,7 +267,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -286,7 +286,7 @@ describe Projects::ClustersController do describe 'security' do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -306,7 +306,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -327,7 +327,7 @@ describe Projects::ClustersController do describe 'security' do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -350,7 +350,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -365,7 +365,7 @@ describe Projects::ClustersController do describe 'security' do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -386,7 +386,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -437,7 +437,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -525,7 +525,7 @@ describe Projects::ClustersController do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -552,7 +552,7 @@ describe Projects::ClustersController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -605,7 +605,7 @@ describe Projects::ClustersController do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb index 003fec8ac68..916a4be2567 100644 --- a/spec/controllers/projects/commit_controller_spec.rb +++ b/spec/controllers/projects/commit_controller_spec.rb @@ -9,7 +9,7 @@ describe Projects::CommitController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'GET show' do diff --git a/spec/controllers/projects/commits_controller_spec.rb b/spec/controllers/projects/commits_controller_spec.rb index 55ed276f96b..d44048fdf55 100644 --- a/spec/controllers/projects/commits_controller_spec.rb +++ b/spec/controllers/projects/commits_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::CommitsController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe "GET show" do diff --git a/spec/controllers/projects/compare_controller_spec.rb b/spec/controllers/projects/compare_controller_spec.rb index b15cde4314e..8695aa826bb 100644 --- a/spec/controllers/projects/compare_controller_spec.rb +++ b/spec/controllers/projects/compare_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::CompareController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'GET index' do diff --git a/spec/controllers/projects/cycle_analytics_controller_spec.rb b/spec/controllers/projects/cycle_analytics_controller_spec.rb index 5516c95d044..5c79269e8f1 100644 --- a/spec/controllers/projects/cycle_analytics_controller_spec.rb +++ b/spec/controllers/projects/cycle_analytics_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::CycleAnalyticsController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'cycle analytics not set up flag' do diff --git a/spec/controllers/projects/deploy_keys_controller_spec.rb b/spec/controllers/projects/deploy_keys_controller_spec.rb index 97db69427e9..d2f133f972a 100644 --- a/spec/controllers/projects/deploy_keys_controller_spec.rb +++ b/spec/controllers/projects/deploy_keys_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::DeployKeysController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/deployments_controller_spec.rb b/spec/controllers/projects/deployments_controller_spec.rb index 6c67dfde63a..d1c960e895d 100644 --- a/spec/controllers/projects/deployments_controller_spec.rb +++ b/spec/controllers/projects/deployments_controller_spec.rb @@ -8,7 +8,7 @@ describe Projects::DeploymentsController do let(:environment) { create(:environment, name: 'production', project: project) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/environments_controller_spec.rb b/spec/controllers/projects/environments_controller_spec.rb index 63cef579864..b86029a4baf 100644 --- a/spec/controllers/projects/environments_controller_spec.rb +++ b/spec/controllers/projects/environments_controller_spec.rb @@ -9,7 +9,7 @@ describe Projects::EnvironmentsController do end before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/find_file_controller_spec.rb b/spec/controllers/projects/find_file_controller_spec.rb index 505fe82851a..66fe41108e2 100644 --- a/spec/controllers/projects/find_file_controller_spec.rb +++ b/spec/controllers/projects/find_file_controller_spec.rb @@ -7,7 +7,7 @@ describe Projects::FindFileController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) controller.instance_variable_set(:@project, project) end diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb index c3605555fe7..da78592a6f6 100644 --- a/spec/controllers/projects/graphs_controller_spec.rb +++ b/spec/controllers/projects/graphs_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::GraphsController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'GET languages' do diff --git a/spec/controllers/projects/group_links_controller_spec.rb b/spec/controllers/projects/group_links_controller_spec.rb index 78c6f7839b4..879aff26deb 100644 --- a/spec/controllers/projects/group_links_controller_spec.rb +++ b/spec/controllers/projects/group_links_controller_spec.rb @@ -7,7 +7,7 @@ describe Projects::GroupLinksController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/hooks_controller_spec.rb b/spec/controllers/projects/hooks_controller_spec.rb index 2d473d5bf52..0f3033b0933 100644 --- a/spec/controllers/projects/hooks_controller_spec.rb +++ b/spec/controllers/projects/hooks_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::HooksController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/imports_controller_spec.rb b/spec/controllers/projects/imports_controller_spec.rb index 6f06210f3de..adf3c78ae51 100644 --- a/spec/controllers/projects/imports_controller_spec.rb +++ b/spec/controllers/projects/imports_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::ImportsController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'GET #show' do diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 3a41f0fc07a..ff1835a34c2 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -695,7 +695,7 @@ describe Projects::IssuesController do let(:project) { merge_request.source_project } before do - project.add_master(user) + project.add_maintainer(user) sign_in user end @@ -869,7 +869,7 @@ describe Projects::IssuesController do def post_spam admin = create(:admin) create(:user_agent_detail, subject: issue) - project.add_master(admin) + project.add_maintainer(admin) sign_in(admin) post :mark_as_spam, { namespace_id: project.namespace, diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb index 6be27126383..1aca44c6e74 100644 --- a/spec/controllers/projects/jobs_controller_spec.rb +++ b/spec/controllers/projects/jobs_controller_spec.rb @@ -431,7 +431,7 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do end describe 'POST erase' do - let(:role) { :master } + let(:role) { :maintainer } before do project.add_role(user, role) diff --git a/spec/controllers/projects/labels_controller_spec.rb b/spec/controllers/projects/labels_controller_spec.rb index 452d7e23983..273702e6d21 100644 --- a/spec/controllers/projects/labels_controller_spec.rb +++ b/spec/controllers/projects/labels_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::LabelsController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/mattermosts_controller_spec.rb b/spec/controllers/projects/mattermosts_controller_spec.rb index c5ac0be27bb..c2a334a849c 100644 --- a/spec/controllers/projects/mattermosts_controller_spec.rb +++ b/spec/controllers/projects/mattermosts_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::MattermostsController do let!(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/merge_requests/creations_controller_spec.rb b/spec/controllers/projects/merge_requests/creations_controller_spec.rb index 00d76f3c39a..d8995f98575 100644 --- a/spec/controllers/projects/merge_requests/creations_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/creations_controller_spec.rb @@ -16,7 +16,7 @@ describe Projects::MergeRequests::CreationsController do end before do - fork_project.add_master(user) + fork_project.add_maintainer(user) Projects::ForkService.new(project, user).execute(fork_project) sign_in(user) end @@ -94,7 +94,7 @@ describe Projects::MergeRequests::CreationsController do let(:other_project) { create(:project, :repository) } before do - other_project.add_master(user) + other_project.add_maintainer(user) end context 'when the path exists in the diff' do diff --git a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb index ec82b35f227..9dc06436c72 100644 --- a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb @@ -140,7 +140,7 @@ describe Projects::MergeRequests::DiffsController do let(:other_project) { create(:project) } before do - other_project.add_master(user) + other_project.add_maintainer(user) diff_for_path(old_path: existing_path, new_path: existing_path, project_id: other_project) end diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb index b1d83246238..ea906cf7f32 100644 --- a/spec/controllers/projects/milestones_controller_spec.rb +++ b/spec/controllers/projects/milestones_controller_spec.rb @@ -11,7 +11,7 @@ describe Projects::MilestonesController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) controller.instance_variable_set(:@project, project) end diff --git a/spec/controllers/projects/pages_controller_spec.rb b/spec/controllers/projects/pages_controller_spec.rb index 8d2fa6a1740..927b6e0c473 100644 --- a/spec/controllers/projects/pages_controller_spec.rb +++ b/spec/controllers/projects/pages_controller_spec.rb @@ -14,7 +14,7 @@ describe Projects::PagesController do before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'GET show' do diff --git a/spec/controllers/projects/pages_domains_controller_spec.rb b/spec/controllers/projects/pages_domains_controller_spec.rb index d4058a5c515..75871eab1ab 100644 --- a/spec/controllers/projects/pages_domains_controller_spec.rb +++ b/spec/controllers/projects/pages_domains_controller_spec.rb @@ -19,7 +19,7 @@ describe Projects::PagesDomainsController do before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'GET show' do diff --git a/spec/controllers/projects/pipeline_schedules_controller_spec.rb b/spec/controllers/projects/pipeline_schedules_controller_spec.rb index 4cdaa54e0bc..7179423dde2 100644 --- a/spec/controllers/projects/pipeline_schedules_controller_spec.rb +++ b/spec/controllers/projects/pipeline_schedules_controller_spec.rb @@ -121,7 +121,7 @@ describe Projects::PipelineSchedulesController do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_allowed_for(:developer).of(project) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -274,7 +274,7 @@ describe Projects::PipelineSchedulesController do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_allowed_for(:developer).of(project).own(pipeline_schedule) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -292,19 +292,19 @@ describe Projects::PipelineSchedulesController do it { expect { go }.to be_allowed_for(developer_1) } it { expect { go }.to be_denied_for(:developer).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } end - context 'when a master created a pipeline schedule' do - let(:master_1) { create(:user) } - let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: master_1) } + context 'when a maintainer created a pipeline schedule' do + let(:maintainer_1) { create(:user) } + let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: maintainer_1) } before do - project.add_master(master_1) + project.add_maintainer(maintainer_1) end - it { expect { go }.to be_allowed_for(master_1) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(maintainer_1) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_denied_for(:developer).of(project) } end end @@ -331,7 +331,7 @@ describe Projects::PipelineSchedulesController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -346,7 +346,7 @@ describe Projects::PipelineSchedulesController do describe 'security' do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_allowed_for(:developer).of(project).own(pipeline_schedule) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -364,7 +364,7 @@ describe Projects::PipelineSchedulesController do describe 'security' do it { expect { go }.to be_allowed_for(:admin) } it { expect { go }.to be_allowed_for(:owner).of(project) } - it { expect { go }.to be_allowed_for(:master).of(project) } + it { expect { go }.to be_allowed_for(:maintainer).of(project) } it { expect { go }.to be_allowed_for(:developer).of(project).own(pipeline_schedule) } it { expect { go }.to be_denied_for(:reporter).of(project) } it { expect { go }.to be_denied_for(:guest).of(project) } @@ -453,9 +453,9 @@ describe Projects::PipelineSchedulesController do end end - context 'when a master makes the request' do + context 'when a maintainer makes the request' do before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/pipelines_settings_controller_spec.rb b/spec/controllers/projects/pipelines_settings_controller_spec.rb index 694896b6bcf..b1ba9f74e38 100644 --- a/spec/controllers/projects/pipelines_settings_controller_spec.rb +++ b/spec/controllers/projects/pipelines_settings_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::PipelinesSettingsController do let(:project) { project_auto_devops.project } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/project_members_controller_spec.rb b/spec/controllers/projects/project_members_controller_spec.rb index d84b31ad978..519af10d78c 100644 --- a/spec/controllers/projects/project_members_controller_spec.rb +++ b/spec/controllers/projects/project_members_controller_spec.rb @@ -37,7 +37,7 @@ describe Projects::ProjectMembersController do context 'when user has enough rights' do before do - project.add_master(user) + project.add_maintainer(user) end it 'adds user to members' do @@ -70,7 +70,7 @@ describe Projects::ProjectMembersController do let(:requester) { create(:project_member, :access_request, project: project) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -121,7 +121,7 @@ describe Projects::ProjectMembersController do context 'when user has enough rights' do before do - project.add_master(user) + project.add_maintainer(user) end it '[HTML] removes user from members' do @@ -181,7 +181,7 @@ describe Projects::ProjectMembersController do let(:project) { create(:project, namespace: user.namespace) } before do - project.add_master(user) + project.add_maintainer(user) end it 'cannot remove themselves from the project' do @@ -263,7 +263,7 @@ describe Projects::ProjectMembersController do context 'when user has enough rights' do before do - project.add_master(user) + project.add_maintainer(user) end it 'adds user to members' do @@ -285,7 +285,7 @@ describe Projects::ProjectMembersController do let(:member) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) another_project.add_guest(member) sign_in(user) end @@ -332,7 +332,7 @@ describe Projects::ProjectMembersController do context 'when creating owner' do before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -346,9 +346,9 @@ describe Projects::ProjectMembersController do end end - context 'when create master' do + context 'when create maintainer' do before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -356,7 +356,7 @@ describe Projects::ProjectMembersController do expect do post :create, user_ids: stranger.id, namespace_id: project.namespace, - access_level: Member::MASTER, + access_level: Member::MAINTAINER, project_id: project end.to change { project.members.count }.by(1) end diff --git a/spec/controllers/projects/prometheus/metrics_controller_spec.rb b/spec/controllers/projects/prometheus/metrics_controller_spec.rb index 871dcf5c796..5c56a712245 100644 --- a/spec/controllers/projects/prometheus/metrics_controller_spec.rb +++ b/spec/controllers/projects/prometheus/metrics_controller_spec.rb @@ -7,7 +7,7 @@ describe Projects::Prometheus::MetricsController do let(:prometheus_adapter) { double('prometheus_adapter', can_query?: true) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/protected_branches_controller_spec.rb b/spec/controllers/projects/protected_branches_controller_spec.rb index 096e29bc39f..ac812707e74 100644 --- a/spec/controllers/projects/protected_branches_controller_spec.rb +++ b/spec/controllers/projects/protected_branches_controller_spec.rb @@ -8,7 +8,7 @@ describe Projects::ProtectedBranchesController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) end describe "GET #index" do @@ -20,10 +20,10 @@ describe Projects::ProtectedBranchesController do end describe "POST #create" do - let(:master_access_level) { [{ access_level: Gitlab::Access::MASTER }] } + let(:maintainer_access_level) { [{ access_level: Gitlab::Access::MAINTAINER }] } let(:access_level_params) do - { merge_access_levels_attributes: master_access_level, - push_access_levels_attributes: master_access_level } + { merge_access_levels_attributes: maintainer_access_level, + push_access_levels_attributes: maintainer_access_level } end let(:create_params) { attributes_for(:protected_branch).merge(access_level_params) } diff --git a/spec/controllers/projects/protected_tags_controller_spec.rb b/spec/controllers/projects/protected_tags_controller_spec.rb index b6de90039f3..20440c5a5d5 100644 --- a/spec/controllers/projects/protected_tags_controller_spec.rb +++ b/spec/controllers/projects/protected_tags_controller_spec.rb @@ -15,7 +15,7 @@ describe Projects::ProtectedTagsController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/runners_controller_spec.rb b/spec/controllers/projects/runners_controller_spec.rb index 2082dd2cff0..b1e0b496ede 100644 --- a/spec/controllers/projects/runners_controller_spec.rb +++ b/spec/controllers/projects/runners_controller_spec.rb @@ -15,7 +15,7 @@ describe Projects::RunnersController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe '#update' do diff --git a/spec/controllers/projects/services_controller_spec.rb b/spec/controllers/projects/services_controller_spec.rb index 61f35cf325b..45cea8c1351 100644 --- a/spec/controllers/projects/services_controller_spec.rb +++ b/spec/controllers/projects/services_controller_spec.rb @@ -9,7 +9,7 @@ describe Projects::ServicesController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe '#test' do diff --git a/spec/controllers/projects/settings/ci_cd_controller_spec.rb b/spec/controllers/projects/settings/ci_cd_controller_spec.rb index d53fe9bf734..1f14a0cc381 100644 --- a/spec/controllers/projects/settings/ci_cd_controller_spec.rb +++ b/spec/controllers/projects/settings/ci_cd_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::Settings::CiCdController do let(:project) { project_auto_devops.project } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end @@ -27,7 +27,7 @@ describe Projects::Settings::CiCdController do let!(:shared_runner) { create(:ci_runner, :instance) } it 'sets assignable project runners only' do - group.add_master(user) + group.add_maintainer(user) get :show, namespace_id: project.namespace, project_id: project @@ -40,7 +40,7 @@ describe Projects::Settings::CiCdController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) allow(ResetProjectCacheService).to receive_message_chain(:new, :execute).and_return(true) end diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb index 77df9a6f567..a2484c04c7a 100644 --- a/spec/controllers/projects/settings/integrations_controller_spec.rb +++ b/spec/controllers/projects/settings/integrations_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::Settings::IntegrationsController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/settings/repository_controller_spec.rb b/spec/controllers/projects/settings/repository_controller_spec.rb index 3a4014b7768..9cee40b7553 100644 --- a/spec/controllers/projects/settings/repository_controller_spec.rb +++ b/spec/controllers/projects/settings/repository_controller_spec.rb @@ -5,7 +5,7 @@ describe Projects::Settings::RepositoryController do let(:user) { create(:user) } before do - project.add_master(user) + project.add_maintainer(user) sign_in(user) end diff --git a/spec/controllers/projects/snippets_controller_spec.rb b/spec/controllers/projects/snippets_controller_spec.rb index e7c0b484ede..9c383bd7628 100644 --- a/spec/controllers/projects/snippets_controller_spec.rb +++ b/spec/controllers/projects/snippets_controller_spec.rb @@ -6,8 +6,8 @@ describe Projects::SnippetsController do let(:user2) { create(:user) } before do - project.add_master(user) - project.add_master(user2) + project.add_maintainer(user) + project.add_maintainer(user2) end describe 'GET #index' do @@ -291,7 +291,7 @@ describe Projects::SnippetsController do def mark_as_spam admin = create(:admin) create(:user_agent_detail, subject: snippet) - project.add_master(admin) + project.add_maintainer(admin) sign_in(admin) post :mark_as_spam, diff --git a/spec/controllers/projects/templates_controller_spec.rb b/spec/controllers/projects/templates_controller_spec.rb index 8fcfa3c9ecd..d7f07aa2b01 100644 --- a/spec/controllers/projects/templates_controller_spec.rb +++ b/spec/controllers/projects/templates_controller_spec.rb @@ -13,7 +13,7 @@ describe Projects::TemplatesController do end before do - project.add_user(user, Gitlab::Access::MASTER) + project.add_user(user, Gitlab::Access::MAINTAINER) project.repository.create_file(user, file_path_1, 'something valid', message: 'test 3', branch_name: 'master') end diff --git a/spec/controllers/projects/tree_controller_spec.rb b/spec/controllers/projects/tree_controller_spec.rb index d3188f054cf..9982b49eebb 100644 --- a/spec/controllers/projects/tree_controller_spec.rb +++ b/spec/controllers/projects/tree_controller_spec.rb @@ -7,7 +7,7 @@ describe Projects::TreeController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) controller.instance_variable_set(:@project, project) end diff --git a/spec/controllers/projects/variables_controller_spec.rb b/spec/controllers/projects/variables_controller_spec.rb index 68019743be0..9afd1f751c6 100644 --- a/spec/controllers/projects/variables_controller_spec.rb +++ b/spec/controllers/projects/variables_controller_spec.rb @@ -6,7 +6,7 @@ describe Projects::VariablesController do before do sign_in(user) - project.add_master(user) + project.add_maintainer(user) end describe 'GET #show' do |