https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42529 --- Comment #29 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200878 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200878&action=edit Bug 42529: Add Koha::Policy::Biblio::AgeRestriction This patch adds age restriction handling to the Koha namespace: - Koha::Biblio->age_restriction: metadata extractor that parses the agerestriction field using the AgeRestrictionMarker system preference. Returns the numeric age or undef. Uses single return with last pattern. - Koha::Policy::Biblio::AgeRestriction->check($biblio, $patron): policy class that evaluates whether a patron meets the age restriction. Returns a Koha::Result::Boolean (with payload on restriction). Test plan: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Policy/Biblio/AgeRestriction.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.