From 43ffba4e8263bbab4cc45a368db5378e4a40b483 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 13 Nov 2021 09:24:53 +0000 Subject: Adopt 2FA emails to new Mailer interface (#36005). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@21279 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/twofa/base.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/redmine/twofa/base.rb b/lib/redmine/twofa/base.rb index a2d288207..aa9fda39a 100644 --- a/lib/redmine/twofa/base.rb +++ b/lib/redmine/twofa/base.rb @@ -53,7 +53,7 @@ module Redmine end def deliver_twofa_paired - ::Mailer.security_notification( + ::Mailer.deliver_security_notification( @user, User.current, { @@ -63,7 +63,7 @@ module Redmine field: "twofa__#{scheme_name}__name", url: {controller: 'my', action: 'account'} } - ).deliver + ) end def destroy_pairing!(code) @@ -82,7 +82,7 @@ module Redmine end def deliver_twofa_unpaired - ::Mailer.security_notification( + ::Mailer.deliver_security_notification( @user, User.current, { @@ -90,7 +90,7 @@ module Redmine message: 'twofa_mail_body_security_notification_unpaired', url: {controller: 'my', action: 'account'} } - ).deliver + ) end def send_code(controller: nil, action: nil) @@ -115,7 +115,7 @@ module Redmine # make sure the user using the backup code is the same it's been issued to return false unless @user.present? && @user == user_from_code - ::Mailer.security_notification( + ::Mailer.deliver_security_notification( @user, User.current, { @@ -124,7 +124,7 @@ module Redmine message: 'twofa_mail_body_backup_code_used', url: {controller: 'my', action: 'account'} } - ).deliver + ) return true end @@ -136,7 +136,7 @@ module Redmine token.update_columns value: Redmine::Utils.random_hex(6) tokens << token end - ::Mailer.security_notification( + ::Mailer.deliver_security_notification( @user, User.current, { @@ -144,7 +144,7 @@ module Redmine message: 'twofa_mail_body_backup_codes_generated', url: {controller: 'my', action: 'account'} } - ).deliver + ) tokens end -- cgit v1.2.3