diff options
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/global_policy.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb index bf146dc375b..16c58730878 100644 --- a/app/policies/global_policy.rb +++ b/app/policies/global_policy.rb @@ -20,7 +20,9 @@ class GlobalPolicy < BasePolicy end condition(:private_instance_statistics, score: 0) { Gitlab::CurrentSettings.instance_statistics_visibility_private? } - rule { admin | ~private_instance_statistics }.enable :read_instance_statistics + + rule { admin | (~private_instance_statistics & ~anonymous) } + .enable :read_instance_statistics rule { anonymous }.policy do prevent :log_in |