diff options
author | Toon Claes <toon@gitlab.com> | 2017-02-16 14:56:14 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-02 12:15:24 +0100 |
commit | f45cbc87015dd2e6369e758ca96132cb44c8983a (patch) | |
tree | 350df9fc270fd3c893afe8f6220b72c91c2a8f2f /lib/api/entities.rb | |
parent | b2c2dfe545526a1857e9605761f6d256ef73e190 (diff) | |
download | gitlab-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.rb | 3 |
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 |