diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2015-03-01 08:06:46 -0700 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2015-03-07 13:11:08 -0700 |
commit | cacac147de2b317d02788c5da1cdc6010f00a340 (patch) | |
tree | 079ba9eb2adb0d34c47205bd778066dda7ce3d60 /app/helpers/visibility_level_helper.rb | |
parent | 3cf4359b00d13959741e8c4909112c21b021c86c (diff) | |
download | gitlab-ce-cacac147de2b317d02788c5da1cdc6010f00a340.tar.gz |
Move restricted visibility settings to the UI
Add checkboxes to the application settings page for restricted
visibility levels, and remove those settings from gitlab.yml.
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r-- | app/helpers/visibility_level_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb index deb9c8b4d49..7c090dc594c 100644 --- a/app/helpers/visibility_level_helper.rb +++ b/app/helpers/visibility_level_helper.rb @@ -60,7 +60,8 @@ module VisibilityLevelHelper Project.visibility_levels.key(level) end - def restricted_visibility_levels - current_user.is_admin? ? [] : gitlab_config.restricted_visibility_levels + def restricted_visibility_levels(show_all = false) + return [] if current_user.is_admin? && !show_all + current_application_settings.restricted_visibility_levels end end |