Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bennett <lukeeeebennettplus@gmail.com>2018-07-18 04:41:40 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-07-27 16:54:27 +0300
commitcac2d06e1374557b1803c48f3c1e93bd8ca1cad6 (patch)
treee5d8f5e51802ce817bfbe6e4344b00988d09f31c /app/helpers
parent602a1c34e33d75940c7acbf4a31a65e187dbbfde (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.rb5
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,