Bugzilla – Attachment 186237 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.26 KB, created by
Martin Renvoize (ashimema)
on 2025-09-05 15:52:49 UTC
(
hide
)
Description:
Bug 30724: (follow-up) Corrections for self-enabling 2FA
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-09-05 15:52:49 UTC
Size:
2.26 KB
patch
obsolete
>From 10c972e5cf7a4962178f099ee8ebffa4a2929b74 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 > >--- > .../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 a93144a46b1..942740d3ff3 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 3c980e10f85..c0ba3d2832e 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.51.0
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