diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-18 13:28:16 +0100 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-18 16:58:04 -0300 |
commit | b959ae553b1243e081d557b1e545d30830931e5b (patch) | |
tree | ce6c7410a97d93645fce4eb4ae77f1e8a1f9879b /lib | |
parent | 0a7f7161198feaa9a4cae7c16669a0e6187aed33 (diff) | |
download | gitlab-ce-b959ae553b1243e081d557b1e545d30830931e5b.tar.gz |
Improve group visibility level feature
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/visibility_level.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 20565e368dd..197e826e5bc 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -85,7 +85,7 @@ module API end class Group < Grape::Entity - expose :id, :name, :path, :description + expose :id, :name, :path, :description, :visibility_level expose :avatar_url expose :web_url do |group, options| diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb index f193fb282ab..58cd8df5219 100644 --- a/lib/gitlab/visibility_level.rb +++ b/lib/gitlab/visibility_level.rb @@ -9,8 +9,8 @@ module Gitlab extend ActiveSupport::Concern included do - scope :public_only, -> { where(visibility_level: PUBLIC) } - scope :public_and_internal_only, -> { where(visibility_level: [PUBLIC, INTERNAL] ) } + scope :public_only, -> { where(visibility_level: PUBLIC) } + scope :public_and_internal_only, -> { where(visibility_level: [PUBLIC, INTERNAL] ) } end PRIVATE = 0 unless const_defined?(:PRIVATE) |