Koha/koha-tmpl/intranet-tmpl/prog/en/includes
Agustin Moyano 5848da810e Bug 23816: Add minimum password length and require strong password overrides by category
This patch adds the capability to override minPasswordLenth and RequireStrongPassword settings by category

To test:
1. koha-shell kohadev
2. koha-mysql kohadev

3. drop database koha_kohadev;
4. create database koha_kohadev;

5. go to admin page and start webinstaller. There continue the steps until onboarding.
6. reach step 3 of onboarding and create a new administrator patron
CHECH => Password control woks as normal (Minimum length 3 and strong required)

7. finish Koha installation and enter admin with your new administrator
8. set minPasswordLength to 3 and RequireStrongPassword to “Don’t require”
9. Create a new category (CAT2 from now on.. CAT1 is the category you made in onboarding process) and set minimum password length to 8 and require strong password
10. Create two new patrons, one with CAT1(patron1) and one with CAT2 (patron2)
CHECK => In both cases, try different combinations of length and strength. For patron1 the only requirement is to have 3 letters, but for patron2 the minimum length will be 8 and will require strong password.
CHECK => Try changing patron category before saving. Password requirements will change with category change.

11. Edit CAT1 and set minimum password length to 5
12. Go to patron1 details page, and change password.
CHECH => Now password minimum length is 5, but still it doesn’t require strong password

13. Edit CAT1, leave blank minimum password length and set require strong password to yes.
14. Go to patron1 details page, and change password.
CHECH => Password minimum length is back to 3, but now strong password is required

15. Set minimum password length in CAT2 to 12.
16. Go to patron2 details page, and click to fill a random generated password
CHECK => generated password should be 12 characters length

17. Set PatronSelfRegistration to Allow in admin settings
18. Go to OPAC and fill self registration from.
CHECK => Play with patron category. For each change in category, password requirements are modified.
CHECK => Set CAT1 as patron category, set ‘aA1’ as password (or another valid password for CAT1) and before hitting submit button, change to CAT2. Form should enter invalid state, and CAT2 password requirements should be displayed as error in password input.

19. Create a patron for CAT1 and another for CAT2, leaving password blank
CHECK => For CAT1’s patron, generated password length is 8 (minimum length for generated passwords), but for CAT2’s patron should be 12

20. In admin set PatronSelfRegistrationVerifyByEmail to require
21. Fill self registration form again with CAT2 as category
CHECK => Password requirements works as previous case.
22. Leave password blank and click submit

23. select * from message_queue;
24. Copy the link in the message and paste it in OPAC
CHECH => Generated password is 12 characters long. (Copy user id for next steps)

25. In admin set OpacResetPassword to Allow
26. Go back to OPAC, reload and click on “Forgot password?” link
27. Paste user id and click submit
28. Repeat steps 23 and 24
CHECK => Info message says “Your password must contain at least 12 characters, including UPPERCASE, lowercase and numbers.”
CHECK => enter an invalid password and you’ll get the same message in warning.

29. Login OPAC with the last user and your newly created password
30. Go to “Change your password” option
CHECK => Info message says “Your password must contain at least 12 characters, including UPPERCASE, lowercase and numbers.”
CHECK => enter an invalid password and you’ll get the same message in below “New password” input.

31. prove t/db_dependent/AuthUtils.t t/db_dependent/Koha/Patron/Category.t

32. Sign off

Sponsored-by: Northeast Kansas Library - NEKLS

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-09 15:39:52 +02:00
..
catalogue Bug 18433: Add missing filter 2020-02-19 16:07:58 +00:00
csv_headers Bug 25867: Label "Current location" as "Current library" and "Permanent location" as "Home library" 2020-08-18 15:48:37 +02:00
mana Bug 23013: Upgrade DataTables in the staff client 2019-08-22 15:23:19 +01:00
modals Bug 25728: Create AV when adding a new item 2020-08-24 11:19:03 +02:00
str Bug 24156: move ColumnsSettings to TablesSettings 2020-06-25 10:51:59 +02:00
virtualshelves/merge
about-team.inc Teams fixes 2020-05-22 11:40:08 +01:00
accounts.inc Bug 25010: Fix typo 'rewewal' in debit types 2020-04-03 14:26:35 +01:00
acquisitions-add-to-basket.inc Bug 24347: Add a 'search to order' option similar to 'search to hold' 2020-01-30 10:58:03 +00:00
acquisitions-menu.inc Bug 22868: Move suggestions_manage subperm out of acquisition perm 2020-01-30 08:27:00 +00:00
acquisitions-search.inc
acquisitions-toolbar.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
additem.js.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
additional-fields-display.inc
additional-fields-entry.inc
admin-items-search-field-form.inc
admin-menu.inc Bug 25919: Only show Desks in admin navigation when UseCirculationDesks is used 2020-08-07 16:54:40 +02:00
adv-search.inc
auth-finder-search.inc
authorities-search-results.inc
authorities-search.inc
authorities-toolbar.inc Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
authorities.inc
authorities_js.inc Bug 25653: Update tab selector to use 'active' and include all options 2020-06-12 10:32:35 +02:00
av-build-dropbox.inc Bug 18680: Add an empty entry by default to sort1/sort2 values in patron account 2020-04-20 12:28:04 +01:00
biblio-default-view.inc
biblio-title-head.inc Bug 11529: Prevent too many spaces/break lines in the title tag 2019-08-05 18:43:26 +01:00
biblio-title.inc Bug 11529: (follow-up) Fix QA issues 2019-08-05 15:03:19 +01:00
biblio-view-menu.inc Bug 10352: Use a new object_type parameter instead of the module's name 2020-01-10 08:36:37 +00:00
blocked-fines.inc Bug 24098: Standardize Fines/Fees & Charges 2020-05-11 09:54:20 +01:00
blocking_errors.inc Bug 24157: New permission - reopen_closed_invoices 2020-07-30 17:30:23 +02:00
borrower_debarments.inc
branch-selector.inc Bug 23184: Don't select branches for export by default 2019-11-21 11:32:31 +00:00
budget_planning.inc Bug 24636: (follow-up) - move 'by' into include file 2020-05-04 08:53:04 +01:00
budgets-active-currency.inc
budgets-admin-search.inc
budgets-admin-toolbar.inc Bug 22786: Prevent fund creation for locked budgets 2019-09-06 13:17:47 +01:00
calendar.inc Bug 25133: (follow-up) Move changes to timepicker.inc 2020-05-04 13:45:31 +01:00
cat-menu.inc
cat-search.inc
cat-toolbar.inc Bug 26139: Centralize code for "Place hold" button (detail) 2020-08-25 11:31:49 +02:00
catalog-strings.inc Bug 26289: Add missing variable definition to templates 2020-08-31 16:10:25 +02:00
cataloging-search.inc
cateditor-ui.inc Bug 17268: (follow-up) Don't show the macro ID in front of description 2020-05-04 08:26:42 +01:00
cateditor-widgets-marc21.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
category-out-of-age-limit.inc Bug 17492: (QA follow-up) Correct template variable 2019-07-01 15:20:31 +01:00
chart.inc Bug 23626: [alternate] Default to including all rows 2019-10-09 14:31:59 +01:00
checkin-search.inc
checkouts-table-footer.inc Bug 20194: Display both biblioitems.itemtype and items.itype in circulation screens 2019-11-03 07:50:19 +00:00
checkouts-table.inc Bug 20194: Display both biblioitems.itemtype and items.itype in circulation screens 2019-11-03 07:50:19 +00:00
circ-menu.inc Bug 15400: (follow-up) Remove unnecessary class 2020-06-29 12:37:02 +02:00
circ-nav.inc Bug 24201: (QA follow-up) IndependentBranches 2020-08-07 16:54:40 +02:00
circ-patron-search-results.inc Bug 15400: Display date of birth and age more consistantly 2020-06-29 12:37:02 +02:00
circ-search.inc
cities-admin-search.inc Bug 25279: Use another var name for the filter 2020-05-12 11:40:07 +01:00
clubs-table.inc Bug 25282: (follow-up) More corrections 2020-04-29 16:20:24 +01:00
columns_settings.inc Bug 26234: Teach our KohaTable constructor the specific th classes 2020-08-19 08:24:04 +02:00
contracts-admin-search.inc
country-list.inc
currencies-admin-search.inc
datatables.inc Bug 24662: Remove global variables MSG_* from datatables.inc 2020-03-11 13:49:15 +00:00
date-format.inc
delimiter_text.inc
desks-admin-search.inc Bug 13881: Add desk management 2020-03-25 09:19:15 +00:00
doc-head-close-receipt.inc
doc-head-close.inc Bug 24661: (RM follow-up) Check lang is defined 2020-02-25 14:28:54 +00:00
doc-head-open.inc Bug 24732: Set DumpTemplateVars Dumper options for Indent and Sort 2020-03-02 10:08:31 +00:00
empty_line.inc
facets.inc Bug 14715: (follow-up) Keep results per page setting when selecting facets and sorting results 2020-03-26 12:03:42 +00:00
filter-orders.inc Bug 14669: (RM follow-up) Ensure updated include compiles 2019-10-09 07:30:51 +01:00
form-blocks.inc
format_price.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
greybox.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
guided-reports-view.inc
header.inc Bug 24201: (QA follow-up) Make logic consistent 2020-08-07 16:54:40 +02:00
holds_table.inc Bug 22789: (QA follow-up) Some minor formatting changes 2020-08-31 16:10:25 +02:00
home-search.inc
html_helpers.inc Bug 24201: (QA follow-up) Fix desks select box selected attribute 2020-08-07 16:54:40 +02:00
i18n.inc
ill-availability-table.inc Bug 23173: (follow-up) Fix QA script errors 2020-04-06 11:05:14 +01:00
ill-list-table-strings.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
ill-list-table.inc Bug 18589: (follow-up) Fix QA tool failures 2019-03-22 20:21:47 +00:00
ill-toolbar.inc Bug 22099: Fixed ILL toolbar to say Refresh when displaying requests 2019-06-03 18:56:29 +01:00
installer-doc-head-close.inc Bug 22451: Use Asset everywhere 2019-04-16 13:17:32 +00:00
installer-intranet-bottom.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
installer-strings.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
intranet-bottom.inc Bug 24201: (follow-up) add desk choice with library choice 2020-08-07 16:54:40 +02:00
intranetstylesheet.inc
js-date-format.inc Bug 24980: (follow-up) return '' when date is null 2020-05-01 08:14:34 +01:00
js_includes.inc Bug 24201: (QA follow-up) Remove setdesk variable and add desk selection script only on pages in need 2020-08-07 16:54:40 +02:00
keyboard_shortcuts.inc Bug 17179: Add keyboard shortcuts to repeat (duplicate) a field, and cut text 2019-10-09 14:36:09 +01:00
labels-toolbar.inc Bug 7468: Print barcodes by range 2020-01-21 11:28:19 +00:00
langmenu-staff-top.inc Bug 20168: Update of the OPAC bootstrap template to bootstrap v4 2020-09-09 14:13:03 +02:00
last-borrower.inc
letters-search.inc
member-alt-address-style.inc Bug 23634: Prevent non-superlibrarians from editing superlibarian emails 2020-09-02 15:40:55 +02:00
member-alt-contact-style.inc Bug 25070: Centralize member-alt-contact-style 2020-06-15 11:53:36 +02:00
member-display-address-style.inc Bug 22087: Add missing filters 2020-07-30 17:44:27 +02:00
member-display-alt-address-style.inc Bug 25070: Centralize member-display-alt-address-style 2020-06-15 11:53:36 +02:00
member-main-address-style.inc Bug 25842: Fix typo streetype in member-main-address-style.inc 2020-06-23 10:16:14 +02:00
members-toolbar.inc Bug 25765: Replace LoginBranchname and LoginBranchcode with use of Branches template plugin 2020-07-23 11:17:27 +02:00
merge-record-strings.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
merge-record.inc
messaging-preference-form.inc Bug 22744: Remove the 'do not notify' buttons 2019-09-23 11:57:40 +01:00
noadd-warnings.inc
onboarding_messages.inc
page-numbers.inc Bug 14715: (follow-up) Keep results per page setting when selecting facets and sorting results 2020-03-26 12:03:42 +00:00
password_check.inc Bug 23816: Add minimum password length and require strong password overrides by category 2020-09-09 15:39:52 +02:00
patron-age.inc Bug 15400: (follow-up) Remove line break 2020-06-29 12:37:02 +02:00
patron-article-requests.inc
patron-return-claims.inc Bug 14697: Enhance the return claims feature 2019-10-31 12:04:21 +00:00
patron-search-box.inc Bug 23697: (QA follow-up) Rename PatronAutocompletion to PatronAutoComplete 2019-10-08 14:51:12 +01:00
patron-search.inc Bug 17374: (follow-up) Remove spaces from include file 2020-03-10 15:18:29 +00:00
patron-title.inc Bug 25747: Don't display a comma when patron has no firstname 2020-06-24 14:31:37 +02:00
patron-toolbar.inc Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
patroncards-errors.inc Bug 24837: Rename selectbranchprinter.pl to set-library.pl 2020-03-24 11:07:22 +00:00
patroncards-toolbar.inc Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
patronfields.inc Bug 17374: (QA follow-up) Make search labels match with patron record 2020-03-10 15:18:29 +00:00
patrons-admin-search.inc
payments.inc Bug 24525: (QA follow-up) Make payment type required with cash registers 2020-02-10 09:17:22 +00:00
permissions.inc Bug 26015: Terminology: Use staff interface instead of staff client 2020-08-31 16:10:25 +02:00
popup-bottom.inc
pos-menu.inc Bug 25138: Terminology: Point of sale should use library instead of branch 2020-04-17 13:50:23 +01:00
prefs-admin-search.inc
prefs-menu.inc Bug 25630: (follow-up) Fix capitalization and terminology for system preferences 2020-09-02 12:05:33 +02:00
quotes-toolbar.inc Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
quotes-upload-toolbar.inc Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
relatives-issues-table.inc Bug 22468: Standardize on labelling ccode table columns as Collections 2020-04-15 12:32:49 +01:00
renew_results.inc Bug 23051: (QA follow-up) Missing curly and tabs and fix test 2020-03-06 10:03:41 +00:00
renew_strings.inc Bug 25717: Improve automatic renewal error messages 2020-07-20 17:45:31 +02:00
reports-menu.inc Bug 20415: add Koha.ArePluginsEnabled Template Toolkit method 2020-03-26 11:41:54 +00:00
reports-toolbar.inc Bug 26165: Fix duplication of large saved reports 2020-08-12 11:46:30 +02:00
resort_form.inc Bug 25014: Fix capitalization for "Call Number" in staff and OPAC sort options 2020-04-03 14:26:34 +01:00
rotating-collections-toolbar.inc Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
search_indexes.inc
select2.inc Bug 25727: (follow-up) Some style updates, JS i18n 2020-08-24 11:19:03 +02:00
serials-menu.inc Bug 23446: Fix display issue in serials navigation 2019-08-16 11:41:55 +01:00
serials-search.inc
serials-toolbar.inc Bug 23065: Rename "New subscription" button when default to current serial 2019-06-13 12:28:00 +01:00
slip-print.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
stockrotation-toolbar.inc Bug 22209: Move stock rotation stage and item forms into modals 2019-08-08 16:05:50 +01:00
strings.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
subscriptions-search.inc
subtypes_unimarc.inc
suggestions-add-search.inc
timepicker.inc Bug 25133: (follow-up) Move changes to timepicker.inc 2020-05-04 13:45:31 +01:00
tools-item-action.inc
tools-menu.inc Bug 25627: Move OPAC problem reports from administration to tools 2020-06-15 11:53:36 +02:00
tools-nomatch-action.inc Bug 23236: Remove 'its items may still be processed' in action if no match is found 2020-03-18 08:41:35 +00:00
tools-overlay-action.inc
validator-strings.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00
vendor-menu.inc
virtualshelves-toolbar.inc Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
waiting_holds.inc Bug 25867: Label "Current location" as "Current library" and "Permanent location" as "Home library" 2020-08-18 15:48:37 +02:00
wysiwyg-systempreferences.inc Bug 25862: Prevent TinyMCE to mangle local url links 2020-07-20 14:05:21 +02:00
xslt-handler.inc
z3950-admin-search.inc
z3950_search.inc Bug 25002: JS Includes should be wrapped with template comments 2020-04-29 17:15:20 +01:00