inveniosoftware / invenio-circulation

Library circulation module for Invenio.
https://invenio-circulation.readthedocs.io
MIT License
0 stars 18 forks source link

can_be_extended as loan extend policy #128

Open topless opened 4 years ago

topless commented 4 years ago

When we configure our CIRCULATION_POLICIES for the transition extension we provide an input max_count which is the number of maximum number of automatic extensions allowed for a loan. This number should affects only patrons, admins and librarians should not be restricted by extensions cap.

Instead of providing a number for max extensions we can move this logic outside of our circulation module and provide instead of max_count a boolean or a method can_be_extended which will do the validation for it.

We will also have to adjust _ensure_valid_extension accordingly.