diff options
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index aa91451c9f4..2fe5280bc1c 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -444,7 +444,11 @@ module API end class Namespace < Grape::Entity - expose :id, :name, :path, :kind, :full_path + expose :id, :name, :path, :kind, :full_path, :parent_id + + expose :members_count do |namespace, _| + namespace.users_with_descendants.count if namespace.kind == 'group' + end end class MemberAccess < Grape::Entity |