View | Details | Raw Unified | Return to bug 29894
Collapse All | Expand All

(-)a/Koha/Auth/TwoFactorAuth.pm (-2 / +2 lines)
Lines 25-32 use Koha::Exceptions::Patron; Link Here
25
25
26
use base qw( Auth::GoogleAuth );
26
use base qw( Auth::GoogleAuth );
27
27
28
use constant CONFIRM_NOTICE_REG => '2FA_REGISTER';
28
use constant CONFIRM_NOTICE_REG => '2FA_ENABLE';
29
use constant CONFIRM_NOTICE_DEREG => '2FA_DEREGISTER';
29
use constant CONFIRM_NOTICE_DEREG => '2FA_DISABLE';
30
30
31
=head1 NAME
31
=head1 NAME
32
32
(-)a/installer/data/mysql/atomicupdate/bug_29894.pl (-3 / +3 lines)
Lines 2-16 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => 29894,
4
    bug_number => 29894,
5
    description => "Add 2FA (de)registering notices",
5
    description => "Add 2FA (de)enabling notices",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do( q{
9
        $dbh->do( q{
10
INSERT IGNORE INTO letter
10
INSERT IGNORE INTO letter
11
(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES
11
(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES
12
('members', '2FA_DEREGISTER', '', 'Confirmation of deregistering two factor authentication', 1, 'Confirmation of deregistering two factor authentication', '<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>\r\n<p>This is to confirm that we deregistered two factor authentication for you.</p>\r\n<p>If you did not deregister, someone else may be using your account. Please contact technical support.</p>\r\n<p>Your library</p>', 'email', 'default'),
12
('members', '2FA_DISABLE', '', 'Confirmation of disabling two factor authentication', 1, 'Confirmation of disabling two factor authentication', '<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>\r\n<p>This is to confirm that someone disabled two factor authentication on your account.</p>\r\n<p>If you did not do this, someone else may be using your account. Please contact technical support.</p>\r\n<p>Your library</p>', 'email', 'default'),
13
('members', '2FA_REGISTER', '', 'Confirmation of registering two factor authentication', 1, 'Confirmation of registering two factor authentication', '<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>\r\n<p>This is to confirm that we registered two factor authentication for you.</p>\r\n<p>If you did not register, someone else may be using your account. Please contact technical support.</p>\r\n<p>Your library</p>', 'email', 'default')
13
('members', '2FA_ENABLE', '', 'Confirmation of enabling two factor authentication', 1, 'Confirmation of enabling two factor authentication', '<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>\r\n<p>This is to confirm that someone enabled two factor authentication on your account.</p>\r\n<p>If you did not do this, someone else may be using your account. Please contact technical support.</p>\r\n<p>Your library</p>', 'email', 'default')
14
        });
14
        });
15
    },
15
    },
16
};
16
};
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-11 / +10 lines)
Lines 1634-1662 tables: Link Here
1634
            - "Notes: <<recalls.recallnotes>>"
1634
            - "Notes: <<recalls.recallnotes>>"
1635
1635
1636
        - module: members
1636
        - module: members
1637
          code: 2FA_DEREGISTER
1637
          code: 2FA_DISABLE
1638
          branchcode: ""
1638
          branchcode: ""
1639
          name: "Confirmation of deregistering two factor authentication"
1639
          name: "Confirmation of disabling two factor authentication"
1640
          is_html: 1
1640
          is_html: 1
1641
          title: "Confirmation of deregistering two factor authentication"
1641
          title: "Confirmation of disabling two factor authentication"
1642
          message_transport_type: email
1642
          message_transport_type: email
1643
          lang: default
1643
          lang: default
1644
          content:
1644
          content:
1645
            - "<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>"
1645
            - "<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>"
1646
            - "<p>This is to confirm that we deregistered two factor authentication for you.</p>"
1646
            - "<p>This is to confirm that someone disabled two factor authentication on your account.</p>"
1647
            - "<p>If you did not deregister, someone else may be using your account. Please contact technical support.</p>"
1647
            - "<p>If you did not do this, someone else may be using your account. Please contact technical support.</p>"
1648
            - "<p>Your library</p>"
1648
            - "<p>Your library</p>"
1649
1649
1650
        - module: members
1650
        - module: members
1651
          code: 2FA_REGISTER
1651
          code: 2FA_ENABLE
1652
          branchcode: ""
1652
          branchcode: ""
1653
          name: "Confirmation of registering two factor authentication"
1653
          name: "Confirmation of enabling two factor authentication"
1654
          is_html: 1
1654
          is_html: 1
1655
          title: "Confirmation of registering two factor authentication"
1655
          title: "Confirmation of enabling two factor authentication"
1656
          message_transport_type: email
1656
          message_transport_type: email
1657
          lang: default
1657
          lang: default
1658
          content:
1658
          content:
1659
            - "<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>"
1659
            - "<p>Dear [% borrower.firstname %] [% borrower.surname %],</p>"
1660
            - "<p>This is to confirm that we registered two factor authentication for you.</p>"
1660
            - "<p>This is to confirm that someone enabled two factor authentication on your account.</p>"
1661
            - "<p>If you did not register, someone else may be using your account. Please contact technical support.</p>"
1661
            - "<p>If you did not do this, someone else may be using your account. Please contact technical support.</p>"
1662
            - "<p>Your library</p>"
1662
            - "<p>Your library</p>"
1663
- 

Return to bug 29894