From 34974258bc3f745c86512319231bad47232fe007 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Wed, 3 May 2017 14:49:37 +0200 Subject: 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. --- lib/api/v3/entities.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/api/v3/entities.rb') diff --git a/lib/api/v3/entities.rb b/lib/api/v3/entities.rb index 56a9b019f1b..101f566f1dd 100644 --- a/lib/api/v3/entities.rb +++ b/lib/api/v3/entities.rb @@ -137,7 +137,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 -- cgit v1.2.1