Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-08-25 13:35:47 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2017-08-25 13:35:47 +0300
commit529a07bd1e05a85b3cfa117ed8980ad64d997db0 (patch)
tree24177b653096f602ad97c29ea8b6c227945f2bf6 /app
parentec784b1e5195848e55185831ee024a756f18a9f0 (diff)
Handle creating a nested group on MySQL correctly
Since we don't support nested groups on MySQL, raise an error explaining that on import instead of trying anyway.
Diffstat (limited to 'app')
-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