summaryrefslogtreecommitdiff
path: root/lib/api/entities.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/entities.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/entities.rb')
-rw-r--r--lib/api/entities.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 3fc2b453eb6..e3692a58119 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -152,7 +152,10 @@ module API
expose :web_url
expose :request_access_enabled
expose :full_name, :full_path
- expose :parent_id
+
+ if ::Group.supports_nested_groups?
+ expose :parent_id
+ end
expose :statistics, if: :statistics do
with_options format_with: -> (value) { value.to_i } do