Bugzilla – Attachment 186253 Details for
Bug 30724
Add ability for administrator to reset a users 2FA
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30724: (follow-up) Corrections for self-enabling 2FA
Bug-30724-follow-up-Corrections-for-self-enabling-.patch (text/plain), 2.30 KB, created by
David Nind
on 2025-09-06 02:36:37 UTC
(
hide
)
Description:
Bug 30724: (follow-up) Corrections for self-enabling 2FA
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-09-06 02:36:37 UTC
Size:
2.30 KB
patch
obsolete
>From 4dbffa8b314224a296099679a3a9f8bf37ca005f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Fri, 5 Sep 2025 16:51:38 +0100 >Subject: [PATCH] Bug 30724: (follow-up) Corrections for self-enabling 2FA > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../intranet-tmpl/prog/en/modules/members/two_factor_auth.tt | 3 ++- > members/two_factor_auth.pl | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt >index a93144a46b..942740d3ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt >@@ -68,6 +68,7 @@ > <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-disable-2FA" /> >+ <input type="hidden" name="borrowernumber" value="[% patron.id | html %]" /> > <input type="submit" value="Disable two-factor authentication" /> > </form> > </div> >@@ -145,7 +146,7 @@ > type: "POST", > url: "/api/v1/auth/two-factor/registration/verification", > success: function (data) { >- window.location = "/cgi-bin/koha/members/two_factor_auth.pl"; >+ window.location = "/cgi-bin/koha/members/two_factor_auth.pl?borrowernumber=[% patron.borrowernumber | url %]"; > }, > error: function (data) { > const error = data.responseJSON.error; >diff --git a/members/two_factor_auth.pl b/members/two_factor_auth.pl >index 3c980e10f8..c0ba3d2832 100755 >--- a/members/two_factor_auth.pl >+++ b/members/two_factor_auth.pl >@@ -49,7 +49,7 @@ my $another_user = $patron_id ne $loggedinuser; > > my $logged_in_user = Koha::Patrons->find($loggedinuser); > >-unless ( !$another_user || $logged_in_user->is_superlibrarian() ) { >+if ( $another_user && !$logged_in_user->is_superlibrarian() ) { > print $cgi->redirect("/cgi-bin/koha/errors/403.pl"); > exit; > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30724
:
184938
|
184939
|
186235
|
186236
|
186237
|
186251
|
186252
| 186253