diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-07-23 14:30:11 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-26 19:00:56 +0200 |
commit | 01fd71adbd2736dcf28e56eb54301b4a01c0f81b (patch) | |
tree | 70cf1bf8d4c78d4c080bfd7e8fa405df4968e376 /app/policies | |
parent | 626d5caf0fb4fe242c24dda294457479eebe6c16 (diff) | |
download | gitlab-ce-01fd71adbd2736dcf28e56eb54301b4a01c0f81b.tar.gz |
Add read_instance_statistics global policy
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/global_policy.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb index 6e3827736b2..bf146dc375b 100644 --- a/app/policies/global_policy.rb +++ b/app/policies/global_policy.rb @@ -19,6 +19,9 @@ class GlobalPolicy < BasePolicy @user&.required_terms_not_accepted? end + condition(:private_instance_statistics, score: 0) { Gitlab::CurrentSettings.instance_statistics_visibility_private? } + rule { admin | ~private_instance_statistics }.enable :read_instance_statistics + rule { anonymous }.policy do prevent :log_in prevent :receive_notifications |