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

Nick Clemens <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #157390|0                           |1
        is obsolete|                            |

--- Comment #6 from Nick Clemens <[email protected]> ---
Created attachment 157425
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157425&action=edit
Bug 35053: Make sure request is checked as an item-level request if item_id
passed

This patch makes the validation code have the `$item` variable defined
when checking holdability, in the case both `item_id` and `biblio_id`
params are passed.

Otherwise, if the requested item is not holdable, but a biblio-level
hold *could* be placed, the item-level hold is placed.

This is highlighted by the regression tests.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests don't pass. A request that should be rejected is allowed
because biblio-level hold is allowed.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Item-level rules are checked and thus the
request rejected (code 403)
5. Sign off :-D

Signed-off-by: David Nind <[email protected]>
Signed-off-by: Nick Clemens <[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