Koha-clms/koha-tmpl
Jake Deery c1f0d97e8b
Bug 41814: Add PatronAgeRestriction syspref and code
This patch adds a new PatronAgeRestriction, which acts in the same way
PatronSelfRegistrationAgeRestriction (a restriction on the maximum age
of a borrower), except for the intranet. It will also act as the
maximum age restrictor on the OPAC, in the event that the
PatronSelfRegistrationAgeRestriction is not set.

To test:
== APPLY PATCH ==
a)  updatedatabase
b)  Set the PatronAgeRestriction syspref to 20, set the
    PatronSelfRegistrationAgeRestriction to 30
c)  On the OPAC, try to create or modify a patron whose age is 35 years
    *)  Note the error message presented, suggesting the age exceeds the
    maximum
d)  On the OPAC, try to create or modify a patron whose age is 25 years
    *)  Note the submission succeeds
e)  On the staff client, try to create or modify a patron whose age is
    25 years *)  Note the error message presented, suggesting the age
    exceeds the maximum
f)  Set the PatronSelfRegistrationAgeRestriction to empty
g)  On the OPAC, try to create or modify a patron whose age is 25 years
    *)  Note the error message presented, suggesting the age exceeds
    the maximum
h)  On the OPAC, try to create or modify a patron whose age is 19 years
    *)  Note the submission succeeds
i)  Set the PatronAgeRestriction to empty
j)  On the staff client, try to create or modify a patron whose age is
    75 years
    *)  Note the submission succeeds
k)  On the OPAC, try to create or modify a patron whose age is 75 years
    *)  Note the submission succeeds
== SIGN OFF ==

Sponsored-by: Cheshire West and Chester Council
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-23 09:16:52 +01:00
..
intranet-tmpl Bug 41814: Add PatronAgeRestriction syspref and code 2026-03-23 09:16:52 +01:00
opac-tmpl Bug 41814: Add PatronAgeRestriction syspref and code 2026-03-23 09:16:52 +01:00