https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42529

--- Comment #25 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 200710
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200710&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 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to