summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-05-03 14:49:37 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2017-05-17 20:53:16 +0200
commit34974258bc3f745c86512319231bad47232fe007 (patch)
treea6b9b7d7a80282f77471302f0970daced62e0455 /lib/api/groups.rb
parentac382b5682dc2d5eea750313c59fb2581af13326 (diff)
downloadgitlab-ce-34974258bc3f745c86512319231bad47232fe007.tar.gz
Hide nested group UI/API support for MySQL
This hides/disables some UI elements and API parameters related to nested groups when MySQL is used, since nested groups are not supported for MySQL.
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r--lib/api/groups.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index 3da7d735da8..ee85b777aff 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -70,7 +70,11 @@ module API
params do
requires :name, type: String, desc: 'The name of the group'
requires :path, type: String, desc: 'The path of the group'
- optional :parent_id, type: Integer, desc: 'The parent group id for creating nested group'
+
+ if ::Group.supports_nested_groups?
+ optional :parent_id, type: Integer, desc: 'The parent group id for creating nested group'
+ end
+
use :optional_params
end
post do