From c7312411b84498ded85b64d0600823cd4e56c850 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 22 Feb 2024 18:15:38 +0100 Subject: [PATCH] Fix auto-close email being sent to users with devops permissions instead of settings permissions (#29356) --- app/workers/scheduler/auto_close_registrations_scheduler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/scheduler/auto_close_registrations_scheduler.rb b/app/workers/scheduler/auto_close_registrations_scheduler.rb index 979b336fa..f774dda11 100644 --- a/app/workers/scheduler/auto_close_registrations_scheduler.rb +++ b/app/workers/scheduler/auto_close_registrations_scheduler.rb @@ -26,7 +26,7 @@ class Scheduler::AutoCloseRegistrationsScheduler def switch_to_approval_mode! Setting.registrations_mode = 'approved' - User.those_who_can(:view_devops).includes(:account).find_each do |user| + User.those_who_can(:manage_settings).includes(:account).find_each do |user| AdminMailer.auto_close_registrations(recipient: user.account).deliver_later end end