1
0
Fork 0
forked from fedi/mastodon

Fix auto-close email being sent to users with devops permissions instead of settings permissions (#29356)

This commit is contained in:
Claire 2024-02-22 18:15:38 +01:00 committed by GitHub
parent 28b666b0d5
commit 4fd22acb4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,7 @@ class Scheduler::AutoCloseRegistrationsScheduler
def switch_to_approval_mode! def switch_to_approval_mode!
Setting.registrations_mode = 'approved' 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.with(recipient: user.account).auto_close_registrations.deliver_later AdminMailer.with(recipient: user.account).auto_close_registrations.deliver_later
end end
end end