diff options
| author | Fabio Papa <fabtheman@gmail.com> | 2019-07-01 13:41:32 -0700 |
|---|---|---|
| committer | Fabio Papa <fabtheman@gmail.com> | 2019-07-19 12:06:56 -0700 |
| commit | 832f668f295d20e00db8d7bd71627724da3a45f3 (patch) | |
| tree | 6ecd5bf301b2213184979de27b2da0f636f9246c | |
| parent | 341bead035919132339233ffdef94961c2829571 (diff) | |
| download | gitlab-ce-832f668f295d20e00db8d7bd71627724da3a45f3.tar.gz | |
Apply changes recomended by merge request coach
| -rw-r--r-- | app/models/group.rb | 4 | ||||
| -rw-r--r-- | spec/controllers/admin/groups_controller_spec.rb | 2 | ||||
| -rw-r--r-- | spec/services/groups/create_service_spec.rb | 9 |
3 files changed, 4 insertions, 11 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 9520db1bc0a..3f80c1373f1 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -416,6 +416,10 @@ class Group < Namespace super || ::Gitlab::CurrentSettings.default_project_creation end + def subgroup_creation_level + super || ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS + end + private def update_two_factor_requirement diff --git a/spec/controllers/admin/groups_controller_spec.rb b/spec/controllers/admin/groups_controller_spec.rb index 34cd0b324b5..1123563c1e3 100644 --- a/spec/controllers/admin/groups_controller_spec.rb +++ b/spec/controllers/admin/groups_controller_spec.rb @@ -70,8 +70,6 @@ describe Admin::GroupsController do end it 'updates the subgroup_creation_level successfully' do - OWNER = ::Gitlab::Access::OWNER_SUBGROUP_ACCESS - expect do post :update, params: { id: group.to_param, diff --git a/spec/services/groups/create_service_spec.rb b/spec/services/groups/create_service_spec.rb index b4e6ddddfac..c5ff6cdbacd 100644 --- a/spec/services/groups/create_service_spec.rb +++ b/spec/services/groups/create_service_spec.rb @@ -1,4 +1,3 @@ -# coding: utf-8 # frozen_string_literal: true require 'spec_helper' @@ -88,14 +87,6 @@ describe Groups::CreateService, '#execute' do it { is_expected.to be_persisted } end - - context 'as maintainer' do - before do - group.add_maintainer(user) - end - - it { is_expected.to be_persisted } - end end end |
