Bugzilla – Attachment 184939 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) Improve user interface text and messaging
Bug-30724-follow-up-Improve-user-interface-text-an.patch (text/plain), 5.39 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-07-31 17:20:53 UTC
(
hide
)
Description:
Bug 30724: (follow-up) Improve user interface text and messaging
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-07-31 17:20:53 UTC
Size:
5.39 KB
patch
obsolete
>From 39de27fa2d52c0896387514a433cdfc46befb80d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 31 Jul 2025 14:16:12 -0300 >Subject: [PATCH] Bug 30724: (follow-up) Improve user interface text and > messaging > >This enhances the user experience with clearer, more contextual messaging >throughout the two-factor authentication management interface. > >Template improvements: >* Add contextual page titles showing patron name when managing others >* Replace generic status messages with personalized, descriptive text >* Provide clear explanation of why 2FA setup is restricted for admins >* Add actionable guidance for superlibrarians on available options >* Use appropriate alert styling (success/info/warning) for different states >* Include patron names in messages for better context > >The new messaging explains the security rationale behind restrictions and >provides clear guidance on what actions are available to different user types. > >To test: >1. As superlibrarian, manage 2FA for another patron >=> SUCCESS: Page title shows "Two-factor authentication for [Name]" >=> SUCCESS: Status messages are personalized with patron name >=> SUCCESS: Clear explanation of setup restrictions with actionable guidance >2. Manage your own 2FA >=> SUCCESS: Messages use "Your account" language appropriately >3. Sign off :-D >--- > .../en/modules/members/two_factor_auth.tt | 42 +++++++++++++++++-- > 1 file changed, 38 insertions(+), 4 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 bbdcde441b1..a93144a46b1 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 >@@ -6,7 +6,13 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title > >[% FILTER collapse %] >- [% t("Two-factor authentication") | html %] >+ [% IF another_user %] >+ [% t("Two-factor authentication for") | html %] >+ [% patron.firstname | html %] >+ [% patron.surname | html %] >+ [% ELSE %] >+ [% t("Two-factor authentication") | html %] >+ [% END %] > › [% t("Patrons") | html %] › [% t("Koha") | html %] > [% END %]</title > > >@@ -47,7 +53,17 @@ > > <div id="registration-status"> > <div id="registration-status-enabled" [% IF !patron.has_2fa_enabled %]style="display: none;"[% END %]> >- <div class="alert alert-info two-factor-status">Status: Enabled</div> >+ [% IF another_user %] >+ <div class="alert alert-success two-factor-status"> >+ <strong>Two-factor authentication: Enabled</strong> >+ <p>[% patron.firstname | html %] [% patron.surname | html %] has two-factor authentication enabled for enhanced account security.</p> >+ </div> >+ [% ELSE %] >+ <div class="alert alert-success two-factor-status"> >+ <strong>Two-factor authentication: Enabled</strong> >+ <p>Your account is protected with two-factor authentication.</p> >+ </div> >+ [% END %] > > <form id="two-factor-auth" action="/cgi-bin/koha/members/two_factor_auth.pl" method="post"> > [% INCLUDE 'csrf-token.inc' %] >@@ -57,9 +73,27 @@ > </div> > > <div id="registration-status-disabled" [% IF patron.has_2fa_enabled %]style="display: none;"[% END %]> >- <div class="alert alert-info two-factor-status">Status: Disabled</div> > [% IF another_user %] >- <div>You cannot enable two-factor authentication for a user. They need to do it themselves.</div> >+ <div class="alert alert-info two-factor-status"> >+ <strong>Two-factor authentication: Disabled</strong> >+ <p>[% patron.firstname | html %] [% patron.surname | html %] does not have two-factor authentication enabled.</p> >+ </div> >+ [% ELSE %] >+ <div class="alert alert-info two-factor-status"> >+ <strong>Two-factor authentication: Disabled</strong> >+ <p>Your account is not protected with two-factor authentication.</p> >+ </div> >+ [% END %] >+ [% IF another_user %] >+ <div class="alert alert-warning"> >+ <strong>Two-factor authentication setup restricted</strong> >+ <p>Two-factor authentication can only be enabled by <strong>[% patron.firstname | html %] [% patron.surname | html %]</strong> themselves, as it requires their personal authenticator device.</p> >+ <p>As a superlibrarian, you can:</p> >+ <ul> >+ <li>Disable their 2FA if they lose access to their device</li> >+ <li>Instruct them to visit <em>Your account â Two-factor authentication</em> to set it up</li> >+ </ul> >+ </div> > [% ELSE %] > [% IF Koha.Preference('TwoFactorAuthentication') == 'enforced' %] > <div>Two-factor authentication is mandatory to login. If you do not enable now it will be asked at your next login.</div> >-- >2.50.1
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