mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
When restoring a backup, disable emails.
This prevents accidental sending of emails after a restore before the admin has had a chance to review everything.
This commit is contained in:
@ -77,6 +77,7 @@ class Admin::BackupsController < Admin::AdminController
|
||||
client_id: params.fetch(:client_id),
|
||||
publish_to_message_bus: true,
|
||||
}
|
||||
SiteSetting.set_and_log(:disable_emails, true, current_user)
|
||||
BackupRestore.restore!(current_user.id, opts)
|
||||
rescue BackupRestore::OperationRunningError
|
||||
render json: failed_json.merge(message: I18n.t("backup.operation_already_running"))
|
||||
|
Reference in New Issue
Block a user