diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-07-23 16:30:11 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-27 16:54:27 +0300 |
commit | 21471777a0f439a9bf46ac2e5e7e7e9906b0ac14 (patch) | |
tree | f2d4b1edb8efd5288753fdffd4139d0586bb87e3 /app/policies/global_policy.rb | |
parent | 1a611cf1e5b0a7953fbb2a064aec72ed92b9e735 (diff) |
Add read_instance_statistics global policy
Diffstat (limited to 'app/policies/global_policy.rb')
-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 |