From 2ef0ed49da94eca8cc5a55cc23b4c8bc94b58aba Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 21 Jan 2022 08:42:08 +0000 Subject: [PATCH] Bug 29894: Db rev for adding notices Content-Type: text/plain; charset=utf-8 This dbrev adds two notices: 2FA_REGISTER and 2FA_DEREGISTER Test plan: Run the dbrev. Check if you see them on Tools/Notices. Signed-off-by: Marcel de Rooy --- .../data/mysql/atomicupdate/bug_29894.pl | 16 +++++++++++ .../mysql/en/mandatory/sample_notices.yml | 28 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_29894.pl diff --git a/installer/data/mysql/atomicupdate/bug_29894.pl b/installer/data/mysql/atomicupdate/bug_29894.pl new file mode 100755 index 0000000000..1c040fc4b5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_29894.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => 29894, + description => "Add 2FA (de)registering notices", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do( q{ +INSERT IGNORE INTO letter +(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES +('members', '2FA_DEREGISTER', '', 'Confirmation of deregistering two factor authentication', 1, 'Confirmation of deregistering two factor authentication', '

Dear [% borrower.firstname %] [% borrower.surname %],

\r\n

This is to confirm that we deregistered two factor authentication for you.

\r\n

If you did not deregister, someone else may be using your account. Please contact technical support.

\r\n

Your library

', 'email', 'default'), +('members', '2FA_REGISTER', '', 'Confirmation of registering two factor authentication', 1, 'Confirmation of registering two factor authentication', '

Dear [% borrower.firstname %] [% borrower.surname %],

\r\n

This is to confirm that we registered two factor authentication for you.

\r\n

If you did not register, someone else may be using your account. Please contact technical support.

\r\n

Your library

', 'email', 'default') + }); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 52d0dbd4ce..a76f5d7fc1 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1576,3 +1576,31 @@ tables: - "This item must be renewed at the library." - "[% END %]" - "[% END %]" + + - module: members + code: 2FA_DEREGISTER + branchcode: "" + name: "Confirmation of deregistering two factor authentication" + is_html: 1 + title: "Confirmation of deregistering two factor authentication" + message_transport_type: email + lang: default + content: + - "

Dear [% borrower.firstname %] [% borrower.surname %],

" + - "

This is to confirm that we deregistered two factor authentication for you.

" + - "

If you did not deregister, someone else may be using your account. Please contact technical support.

" + - "

Your library

" + + - module: members + code: 2FA_REGISTER + branchcode: "" + name: "Confirmation of registering two factor authentication" + is_html: 1 + title: "Confirmation of registering two factor authentication" + message_transport_type: email + lang: default + content: + - "

Dear [% borrower.firstname %] [% borrower.surname %],

" + - "

This is to confirm that we registered two factor authentication for you.

" + - "

If you did not register, someone else may be using your account. Please contact technical support.

" + - "

Your library

" -- 2.20.1