Bugzilla – Attachment 169864 Details for
Bug 25947
Improve locked account message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25947: Improve locked account message
Bug-25947-Improve-locked-account-message.patch (text/plain), 3.97 KB, created by
Roman Dolny
on 2024-07-30 14:07:09 UTC
(
hide
)
Description:
Bug 25947: Improve locked account message
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2024-07-30 14:07:09 UTC
Size:
3.97 KB
patch
obsolete
>From b36e2d3c58a010601ee20c8ac5e6f75925ebec6b Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 29 Jul 2024 16:33:41 +0200 >Subject: [PATCH] Bug 25947: Improve locked account message > >When using system preference 'FailedLoginAttempts', a patron's account is blocked after X many failed login attempts on the OPAC. > >This patch adds, like for "Patron's card has expired" message : > * a message "Patron's account has been locked (due to X failed login attempts)" on the patron details and circulation pages > * a link to change password >Links are only displayed if libarian has permission to edit patrons. > >For administrative lock, only a message is displayed : >"Patron's account has been administratively locked" > >To test: >1. Change system preference 'FailedLoginAttempts' to a small number, like 2 >2. Go to a patron's account and copy their username (while you're there, change the password and add some fines, too) >3. In the OPAC, try to log in with the username and a wrong password 3 times >4. Go back to the patron's account in the staff interface >5. Note that there is a message : "Patron's account has been locked (due to 3 failed login attempts)" >6. Click on "Change password", you go to change password page > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > .../prog/en/includes/patron_messages.inc | 21 ++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index 1c32d8767e..0888251432 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -5,7 +5,7 @@ > [% SET return_claims = patron.return_claims %] > [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %] > >-[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits ) %] >+[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits || patron.account_locked ) %] > <h3>Attention</h3> > <ul> > [% IF ( has_modifications ) %] >@@ -52,6 +52,25 @@ > </li> > [% END %] > >+ [% IF patron.account_locked %] >+ [% IF patron.login_attempts < 0 %] >+ <li class="blocker account_admin_locked"> >+ <span class="circ-hlt">Locked: </span><span> Patron's account has been administratively locked</span> >+ </li> >+ [% ELSE %] >+ <li class="blocker account_locked"> >+ <span class="circ-hlt">Locked: </span><span> Patron's account has been locked (due to [% patron.login_attempts | html %] failed login attempts)</span> >+ [% IF CAN_user_borrowers_edit_borrowers %] >+ <span> >+ <a href="/cgi-bin/koha/members/member-password.pl?member=[% patron.borrowernumber | uri %]">Change password</a> >+ </span> >+ [% END %] >+ </li> >+ [% END %] >+ [% END %] >+ >+ >+ > [% IF ( patron.gonenoaddress ) %] > <li class="gonenoaddress blocker"> > <span title="gonenoaddress flag is set in patron record"><span class="circ-hlt">Address:</span> Patron's address flagged as in doubt</span> <a class="btn btn-default btn-xs" href="/cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=[% patron.borrowernumber | uri %]&step=3#memberentry_account_flags"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> >-- >2.39.2
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 25947
:
106643
|
145502
|
145503
|
145589
|
145878
|
147683
|
169844
|
169853
| 169864 |
174271
|
174272