diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-07-26 14:57:12 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-07-26 14:57:12 +0000 |
commit | bd1a5a9f422df267725bd5fbd254f3c1f16fd596 (patch) | |
tree | c32866892bab7a9aeb2def1d76dafd4a17bcb521 /app/services | |
parent | 900ef6fc316c7d4024545b5d08598c61fa9f3936 (diff) | |
parent | 1ce5bcacdbf56682e05fa63875203bf4d10584bc (diff) | |
download | gitlab-ce-bd1a5a9f422df267725bd5fbd254f3c1f16fd596.tar.gz |
Merge branch 'remove-nested-groups-checks' into 'master'
Remove code related to object hierarchy and MySQL
Closes #65056 and #65055
See merge request gitlab-org/gitlab-ce!31095
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/groups/nested_create_service.rb | 4 | ||||
-rw-r--r-- | app/services/groups/transfer_service.rb | 1 | ||||
-rw-r--r-- | app/services/members/destroy_service.rb | 2 | ||||
-rw-r--r-- | app/services/users/refresh_authorized_projects_service.rb | 8 |
4 files changed, 2 insertions, 13 deletions
diff --git a/app/services/groups/nested_create_service.rb b/app/services/groups/nested_create_service.rb index 01bd685712b..a51ac9aa593 100644 --- a/app/services/groups/nested_create_service.rb +++ b/app/services/groups/nested_create_service.rb @@ -18,10 +18,6 @@ module Groups return namespace end - if group_path.include?('/') && !Group.supports_nested_objects? - raise 'Nested groups are not supported on MySQL' - end - create_group_path end diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb index 98e7c311572..fe7e07ef9f0 100644 --- a/app/services/groups/transfer_service.rb +++ b/app/services/groups/transfer_service.rb @@ -43,7 +43,6 @@ module Groups def ensure_allowed_transfer raise_transfer_error(:group_is_already_root) if group_is_already_root? - raise_transfer_error(:database_not_supported) unless Group.supports_nested_objects? raise_transfer_error(:same_parent_as_current) if same_parent? raise_transfer_error(:invalid_policies) unless valid_policies? raise_transfer_error(:namespace_with_same_path) if namespace_with_same_path? diff --git a/app/services/members/destroy_service.rb b/app/services/members/destroy_service.rb index c8d5e563cd8..0164760920f 100644 --- a/app/services/members/destroy_service.rb +++ b/app/services/members/destroy_service.rb @@ -31,7 +31,7 @@ module Members return unless member.is_a?(GroupMember) && member.user && member.group delete_project_members(member) - delete_subgroup_members(member) if Group.supports_nested_objects? + delete_subgroup_members(member) end def delete_project_members(member) diff --git a/app/services/users/refresh_authorized_projects_service.rb b/app/services/users/refresh_authorized_projects_service.rb index 4a26d2be2af..ae67b4f5256 100644 --- a/app/services/users/refresh_authorized_projects_service.rb +++ b/app/services/users/refresh_authorized_projects_service.rb @@ -102,13 +102,7 @@ module Users end def fresh_authorizations - klass = if Group.supports_nested_objects? - Gitlab::ProjectAuthorizations::WithNestedGroups - else - Gitlab::ProjectAuthorizations::WithoutNestedGroups - end - - klass.new(user).calculate + Gitlab::ProjectAuthorizations.new(user).calculate end end end |