summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-02-16 14:56:14 +0100
committerToon Claes <toon@gitlab.com>2017-03-02 12:15:24 +0100
commitf45cbc87015dd2e6369e758ca96132cb44c8983a (patch)
tree350df9fc270fd3c893afe8f6220b72c91c2a8f2f /lib/api/entities.rb
parentb2c2dfe545526a1857e9605761f6d256ef73e190 (diff)
downloadgitlab-ce-f45cbc87015dd2e6369e758ca96132cb44c8983a.tar.gz
Expose Group VisibilityLevel as String
Instead of exposing the VisibilityLevel as Integer, expose it as String `visibility`.
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index bcdd0573e57..fb067046fd2 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -132,7 +132,8 @@ module API
end
class Group < Grape::Entity
- expose :id, :name, :path, :description, :visibility_level
+ expose :id, :name, :path, :description
+ expose(:visibility) { |group, _options| Gitlab::VisibilityLevel.string_level(group.visibility_level) }
expose :lfs_enabled?, as: :lfs_enabled
expose :avatar_url
expose :web_url