diff options
Diffstat (limited to 'app/policies/global_policy.rb')
-rw-r--r-- | app/policies/global_policy.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb index d028738ccc9..b64e7e16433 100644 --- a/app/policies/global_policy.rb +++ b/app/policies/global_policy.rb @@ -23,9 +23,11 @@ class GlobalPolicy < BasePolicy condition(:migration_bot, scope: :user) { @user&.migration_bot? } condition(:create_runner_workflow_enabled) do - Feature.enabled?(:create_runner_workflow) + Feature.enabled?(:create_runner_workflow_for_admin, @user) end + condition(:service_account, scope: :user) { @user&.service_account? } + rule { anonymous }.policy do prevent :log_in prevent :receive_notifications @@ -64,7 +66,7 @@ class GlobalPolicy < BasePolicy prevent :access_git end - rule { project_bot }.policy do + rule { project_bot | service_account }.policy do prevent :log_in prevent :receive_notifications end |