diff options
author | Nick Thomas <nick@gitlab.com> | 2017-07-17 11:40:17 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-07-17 11:54:07 +0100 |
commit | c9e6caaef4c467343d162c5841b5543940b092a1 (patch) | |
tree | 94b7183af17e1cddcce839517f62a5ed387b44df /app/models/namespace.rb | |
parent | 5f32bd774ad5cb89685dab5102e0614b2593d4ff (diff) | |
download | gitlab-ce-c9e6caaef4c467343d162c5841b5543940b092a1.tar.gz |
Promote visibility level helpers from Group to Namespace
In EE, we make use of `namespace#public?` in projects. When the project is in a
personal namespace, this breaks as the `public?` helper isn't present.
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 15713fc5f6d..0bb04194bdb 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -5,6 +5,7 @@ class Namespace < ActiveRecord::Base include Sortable include Gitlab::ShellAdapter include Gitlab::CurrentSettings + include Gitlab::VisibilityLevel include Routable include AfterCommitQueue @@ -105,6 +106,10 @@ class Namespace < ActiveRecord::Base end end + def visibility_level_field + :visibility_level + end + def to_param full_path end |