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

--- Comment #8 from David Nind <[email protected]> ---
Created attachment 212467
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212467&action=edit
Bug 27184: Add Koha::Module::Policy::CheckoutHistory

This patch adds a module policy (see Koha::Module::Policy, bug 42383)
for the checkout history views: the patron's circulation history and
the record's checkout history (bug 29275).

Both views decide what to display from the same system preferences and
permissions, and their API routes enforce the same rules. The policy
is the single place where they are computed:

- view_patrons: circulate_remaining_permissions
- view_checkout_history: intranetreadinghistory enabled and
  borrowers: view_checkout_history
- hide_patron_name: HidePatronName
- anonymous_patron_id: AnonymousPatron
- show_issuer: RecordStaffUserOnCheckout
- onsite_checkouts: OnSiteCheckouts

The checkout_history_policy API definition is added, and
checkout_history is added to the module_policy definition, so API
errors can carry it.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
  k$ prove t/db_dependent/Koha/Module/Policy/CheckoutHistory.t \
           t/db_dependent/Koha/Module/Policy.t \
           xt/api.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)
Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to