<<

NAME

Koha::Module::Policy::Checkin - Policy contract for the checkin module

SYNOPSIS

    my $policy = Koha::Module::Policy::Checkin->new(
        {
            user    => $patron,
            library => $branchcode,
        }
    );

    # As hashref, serialized as JSON for the page and the policy
    # attribute of API errors. Module keys are under the 'checkin' key.
    my $caps = $policy->to_hashref;

DESCRIPTION

Defines what the checkin module UI should offer to the current user at the current library. This is the intersection of system preferences, user permissions, and library context.

The client reads the policy and uses it to show/hide controls. The server still enforces every action - this is informational, not an authorization token.

The keys listed below are returned under the checkin key of the policy envelope, next to the global namespace inherited from Koha::Module::Policy (e.g., audio_alerts, catalog_concerns). See the base class documentation for the full list of global keys. The API contract is described by the checkin_policy definition.

Flags are JSON booleans.

Policy keys

exempt_fine - User can exempt fines on return (pref + permission)
specify_return_date - Return date override field available
dropbox_mode - Book drop mode available
dropbox_date - Effective return date used in book drop mode (YYYY-MM-DD)
anonymous_patron_id - The AnonymousPatron patron id, used to recognise anonymized checkouts
forgive_hold_fees - Can forgive manual hold expiration charges
recalls_enabled - Recall feature active
holds_auto_fill - Holds automatically filled on checkin
holds_auto_fill_print_slip - Auto-print slip when hold auto-filled
transfers_block - Transfer modals are blocking (must be acted on)
auto_confirm_transfer - Transfers auto-confirmed without modal
confirm_item_parts - Multi-part items require confirmation
show_all_checkins - Display items scanned but not actually returned
max_returned_items - Max items to display in the checked-in table
fine_notify_at_checkin - Show patron balance after checkin
waiting_notify_at_checkin - Show waiting holds after checkin
display_hold_groups - Show hold group info in hold modals
block_return_withdrawn - Withdrawn items are blocked (informational)
block_return_lost - Lost items are blocked (informational)

API

Methods

module

    my $module = $policy->module;    # 'checkin'

Returns the module name.

_build_hashref

Builds the policy hashref for the checkin module.

NOTES

Policy delivery

The policy is delivered to the client in two ways:

Permissions in the template shell

The .tt shell injects CAN_user_* flags for page chrome (header, sidebar navigation). This is separate from the module policy which governs the module's functional capabilities.

AUTHOR

Koha Development Team <https://koha-community.org/>

<<