Bug 33070 - Get rid of Koha::Patron->can_edit_item and use can_edit_item_from instead
Summary: Get rid of Koha::Patron->can_edit_item and use can_edit_item_from instead
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Jonathan Druart
URL:
Keywords:
: 34173 (view as bug list)
Depends on: 20256
Blocks: 33167 34173
  Show dependency treegraph
 
Reported: 2023-02-24 19:35 UTC by Tomás Cohen Arazi
Modified: 2023-07-16 11:46 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00


Attachments
Bug 33070: Remove use of can_edit_items (11.39 KB, patch)
2023-02-24 19:37 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 33070: Remove use of can_edit_items (11.46 KB, patch)
2023-03-17 11:17 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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. ***