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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt (-1 / +2 lines)
Lines 68-73 Link Here
68
                <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
68
                <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post">
69
                    [% INCLUDE 'csrf-token.inc' %]
69
                    [% INCLUDE 'csrf-token.inc' %]
70
                    <input type="hidden" name="op" value="cud-disable-2FA" />
70
                    <input type="hidden" name="op" value="cud-disable-2FA" />
71
                    <input type="hidden" name="borrowernumber" value="[% patron.id | html %]" />
71
                    <input type="submit" value="Disable two-factor authentication" />
72
                    <input type="submit" value="Disable two-factor authentication" />
72
                </form>
73
                </form>
73
            </div>
74
            </div>
Lines 145-151 Link Here
145
                    type: "POST",
146
                    type: "POST",
146
                    url: "/api/v1/auth/two-factor/registration/verification",
147
                    url: "/api/v1/auth/two-factor/registration/verification",
147
                    success: function (data) {
148
                    success: function (data) {
148
                        window.location = "/cgi-bin/koha/members/two_factor_auth.pl";
149
                        window.location = "/cgi-bin/koha/members/two_factor_auth.pl?borrowernumber=[% patron.borrowernumber | url %]";
149
                    },
150
                    },
150
                    error: function (data) {
151
                    error: function (data) {
151
                        const error = data.responseJSON.error;
152
                        const error = data.responseJSON.error;
(-)a/members/two_factor_auth.pl (-2 / +1 lines)
Lines 49-55 my $another_user = $patron_id ne $loggedinuser; Link Here
49
49
50
my $logged_in_user = Koha::Patrons->find($loggedinuser);
50
my $logged_in_user = Koha::Patrons->find($loggedinuser);
51
51
52
unless ( !$another_user || $logged_in_user->is_superlibrarian() ) {
52
if ( $another_user && !$logged_in_user->is_superlibrarian() ) {
53
    print $cgi->redirect("/cgi-bin/koha/errors/403.pl");
53
    print $cgi->redirect("/cgi-bin/koha/errors/403.pl");
54
    exit;
54
    exit;
55
}
55
}
56
- 

Return to bug 30724