diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-25 17:36:08 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-07-27 14:14:47 +0200 |
commit | 61b0e8ca0b2a1c50aeee318c7e42c40fd0816108 (patch) | |
tree | e8ee1bf5900919792526c04cf55e2b9647eb917b /app/policies | |
parent | fb6375a57633ba633760e5542739c544bf5595aa (diff) | |
download | gitlab-ce-61b0e8ca0b2a1c50aeee318c7e42c40fd0816108.tar.gz |
Spec instance statistics
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 |