diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-07-18 04:41:40 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-27 16:54:27 +0300 |
commit | cac2d06e1374557b1803c48f3c1e93bd8ca1cad6 (patch) | |
tree | e5d8f5e51802ce817bfbe6e4344b00988d09f31c /app/helpers | |
parent | 602a1c34e33d75940c7acbf4a31a65e187dbbfde (diff) |
Add instance_statistics_visibility_private application setting and top nav icon
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_settings_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index 358b896702b..b355008f087 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -15,6 +15,10 @@ module ApplicationSettingsHelper def allowed_protocols_present? Gitlab::CurrentSettings.enabled_git_access_protocol.present? end + + def hide_instance_statistics?(user = current_user) + Gitlab::CurrentSettings.instance_statistics_visibility_private? && !user.admin? + end def enabled_protocol case Gitlab::CurrentSettings.enabled_git_access_protocol @@ -247,6 +251,7 @@ module ApplicationSettingsHelper :unique_ips_limit_per_user, :unique_ips_limit_time_window, :usage_ping_enabled, + :instance_statistics_visibility_private, :user_default_external, :user_oauth_applications, :version_check_enabled, |