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 15:54:28 +0200 |
commit | 00b5f5475f7f35620d01033711cdb8e2f5fff5c8 (patch) | |
tree | 128cc055ea7a8233ca23b0b78fd2a7dc646d063b /app/policies | |
parent | 702a09c18365cbaa88edb8396339a61a73f29d23 (diff) | |
download | gitlab-ce-00b5f5475f7f35620d01033711cdb8e2f5fff5c8.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 |