diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/visibility_level.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb index 582fc759efd..335dc44be19 100644 --- a/lib/gitlab/visibility_level.rb +++ b/lib/gitlab/visibility_level.rb @@ -47,6 +47,10 @@ module Gitlab def valid_level?(level) options.has_value?(level) end + + def allowed_fork_levels(origin_level) + [PRIVATE, INTERNAL, PUBLIC].select{ |level| level <= origin_level } + end end def private? |