Bug 33070

Summary: Get rid of Koha::Patron->can_edit_item and use can_edit_item_from instead
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle>
Status: RESOLVED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: matt.blenkinsop, tomascohen, wizzyrea
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00
Bug Depends on: 20256    
Bug Blocks: 33167, 34173    
Attachments: Bug 33070: Remove use of can_edit_items
Bug 33070: Remove use of can_edit_items

Description Tomás Cohen Arazi 2023-02-24 19:35:41 UTC
Bug 20256 introduced a pattern we are trying to avoid for a long time now (old patchset). It should be refactored and cleaned.
Comment 1 Tomás Cohen Arazi 2023-02-24 19:37:04 UTC
Created attachment 147397 [details] [review]
Bug 33070: Remove use of can_edit_items

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Acquisition/Order.t
3) git grep "can_edit_item("
   should return no results

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2023-03-17 11:17:16 UTC
Created attachment 148325 [details] [review]
Bug 33070: Remove use of can_edit_items

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Acquisition/Order.t
3) git grep "can_edit_item("
   should return no results

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Tomás Cohen Arazi 2023-03-17 12:59:59 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 4 Matt Blenkinsop 2023-03-17 17:06:48 UTC
Not backporting to stable as this is dependent on bug 20256 which has not been backported
Comment 5 Katrin Fischer 2023-07-16 11:46:33 UTC
*** Bug 34173 has been marked as a duplicate of this bug. ***