diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-05 00:09:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-05 00:09:41 +0300 |
commit | b3cd77e90438a6c6e837dc27627d4c76f85ecd29 (patch) | |
tree | 52bbe45c9fd2aaceaca613bce04e7aab4a8aa07b /app/policies/global_policy.rb | |
parent | 9bbcab8301ed38576debcb6a7f07f99005ff805a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/global_policy.rb')
-rw-r--r-- | app/policies/global_policy.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb index b6cf945bf5a..03f5a863421 100644 --- a/app/policies/global_policy.rb +++ b/app/policies/global_policy.rb @@ -18,6 +18,7 @@ class GlobalPolicy < BasePolicy condition(:private_instance_statistics, score: 0) { Gitlab::CurrentSettings.instance_statistics_visibility_private? } condition(:project_bot, scope: :user) { @user&.project_bot? } + condition(:migration_bot, scope: :user) { @user&.migration_bot? } rule { admin | (~private_instance_statistics & ~anonymous) } .enable :read_instance_statistics @@ -48,11 +49,14 @@ class GlobalPolicy < BasePolicy rule { blocked | internal }.policy do prevent :log_in prevent :access_api - prevent :access_git prevent :receive_notifications prevent :use_slash_commands end + rule { blocked | (internal & ~migration_bot) }.policy do + prevent :access_git + end + rule { project_bot }.policy do prevent :log_in prevent :receive_notifications |