summaryrefslogtreecommitdiff
path: root/app/services/groups
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-08-25 12:35:47 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-08-25 12:35:47 +0200
commit529a07bd1e05a85b3cfa117ed8980ad64d997db0 (patch)
tree24177b653096f602ad97c29ea8b6c227945f2bf6 /app/services/groups
parentec784b1e5195848e55185831ee024a756f18a9f0 (diff)
downloadgitlab-ce-529a07bd1e05a85b3cfa117ed8980ad64d997db0.tar.gz
Handle creating a nested group on MySQL correctlybvl-fix-mysql-bare-repository-importer
Since we don't support nested groups on MySQL, raise an error explaining that on import instead of trying anyway.
Diffstat (limited to 'app/services/groups')
-rw-r--r--app/services/groups/nested_create_service.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/groups/nested_create_service.rb b/app/services/groups/nested_create_service.rb
index 8d793f5c02e..d6f08fc3cce 100644
--- a/app/services/groups/nested_create_service.rb
+++ b/app/services/groups/nested_create_service.rb
@@ -15,6 +15,10 @@ module Groups
return group
end
+ if group_path.include?('/') && !Group.supports_nested_groups?
+ raise 'Nested groups are not supported on MySQL'
+ end
+
create_group_path
end