]> git.koha-community.org Git - koha.git/commit
Bug 21890: Allow restricting password resets by patron category
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 31 Jan 2019 19:29:30 +0000 (16:29 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 12 Apr 2019 02:32:03 +0000 (02:32 +0000)
commit376d1a70232e7c0e96adbd7c5300ce593c0e120a
treee082e2e235e4c4d7296d12285d4be1a0d85992d6
parente55b627603450313954b98704e73d0baa3ed56f9
Bug 21890: Allow restricting password resets by patron category

This patch makes the templates relying on the OpacResetPassword syspref
use the introduced TT plugin method instead by changing:

[% IF Koha.Preference('OpacResetPassword') %]

=>

[% IF Categories.can_any_reset_password %]

To test:
- Verify that all the places in which the 'forgot password' link is
displayed in OPAC keep working, provided there's at least one category
that has the flag set
- Attempt to recover the password for a patron that belong to a valid
category (i.e. that has the flag set)
=> SUCCESS: You can go through the normal process
- Attempt to recover the password for a patron that belongs to a
category with the flag unset.
=> SUCCESS: Once Koha identifies your category, you are told you are not
allowed to do it
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
admin/categories.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-password-recovery.tt
opac/opac-password-recovery.pl