Bug 20256 - Add ability to limit editing of items to home library or library group
Summary: Add ability to limit editing of items to home library or library group
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords: rel_22_05_candidate
: 6423 22923 28174 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-21 08:00 UTC by Kyle M Hall
Modified: 2022-07-24 22:11 UTC (History)
16 users (show)

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


Attachments
Bug 20256: Update database (3.40 KB, patch)
2019-03-29 18:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.32 KB, patch)
2019-03-29 18:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.63 KB, patch)
2019-03-29 18:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.32 KB, patch)
2019-03-29 18:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update Schema file (1.61 KB, patch)
2019-03-29 18:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (8.65 KB, patch)
2019-03-29 18:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.18 KB, patch)
2019-03-29 18:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.26 KB, patch)
2019-03-29 18:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2019-04-01 10:17 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.32 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.63 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.31 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update Schema file (1.61 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (8.65 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.18 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.26 KB, patch)
2019-04-01 10:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.95 KB, patch)
2019-04-23 16:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.95 KB, patch)
2019-04-23 16:40 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.43 KB, patch)
2019-04-23 16:40 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.74 KB, patch)
2019-04-23 16:40 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.42 KB, patch)
2019-04-23 16:40 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update Schema file (1.72 KB, patch)
2019-04-23 16:41 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (8.76 KB, patch)
2019-04-23 16:41 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.29 KB, patch)
2019-04-23 16:41 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.43 KB, patch)
2019-04-23 16:41 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA Follow-up) Remove double negative from code (2.74 KB, patch)
2019-04-24 15:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.72 KB, patch)
2019-04-25 07:48 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (889 bytes, patch)
2019-04-25 07:48 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.15 KB, patch)
2019-04-25 07:48 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.41 KB, patch)
2019-04-25 07:48 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.26 KB, patch)
2019-04-26 14:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.48 KB, patch)
2019-04-26 14:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2019-12-05 12:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.32 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.63 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.31 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update Schema file (1.57 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (8.65 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (6.90 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.32 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.74 KB, patch)
2019-12-05 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (907 bytes, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.16 KB, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.42 KB, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.24 KB, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.48 KB, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (742 bytes, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.36 KB, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.15 KB, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (3.31 KB, patch)
2019-12-05 12:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.58 KB, patch)
2020-04-09 14:42 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.58 KB, patch)
2020-04-09 14:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.58 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.32 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.63 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.31 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.32 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (6.92 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.38 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.76 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (931 bytes, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.21 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.47 KB, patch)
2020-04-09 14:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.31 KB, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.48 KB, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (740 bytes, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.36 KB, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.09 KB, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.05 KB, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.06 KB, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.58 KB, patch)
2020-04-09 14:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.58 KB, patch)
2020-04-10 13:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.58 KB, patch)
2020-04-10 13:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.32 KB, patch)
2020-04-10 13:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.63 KB, patch)
2020-04-10 13:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.31 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.32 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (6.92 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.38 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.76 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (931 bytes, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.21 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.47 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.31 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.48 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (740 bytes, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.36 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.09 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.05 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.06 KB, patch)
2020-04-10 13:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.58 KB, patch)
2020-04-10 13:10 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.64 KB, patch)
2020-04-10 16:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.64 KB, patch)
2020-04-10 16:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.37 KB, patch)
2020-04-10 16:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.69 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.37 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.37 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (6.98 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.44 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.82 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (990 bytes, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.27 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.53 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.36 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.54 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (799 bytes, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.42 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.15 KB, patch)
2020-04-10 16:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.11 KB, patch)
2020-04-10 16:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.12 KB, patch)
2020-04-10 16:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.63 KB, patch)
2020-04-10 16:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.64 KB, patch)
2020-07-24 11:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.37 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.69 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.37 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.37 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (6.98 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.28 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.82 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (990 bytes, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.27 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.53 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.36 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.54 KB, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (799 bytes, patch)
2020-07-24 11:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.42 KB, patch)
2020-07-24 11:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.38 KB, patch)
2020-07-24 11:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.12 KB, patch)
2020-07-24 11:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.12 KB, patch)
2020-07-24 11:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.63 KB, patch)
2020-07-24 11:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.64 KB, patch)
2020-08-21 18:17 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.64 KB, patch)
2020-08-21 18:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.37 KB, patch)
2020-08-21 18:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.69 KB, patch)
2020-08-21 18:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.37 KB, patch)
2020-08-21 18:19 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.37 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.03 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.28 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.82 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (990 bytes, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.27 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.53 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.36 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.18 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (799 bytes, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.42 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.38 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.14 KB, patch)
2020-08-21 18:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.12 KB, patch)
2020-08-21 18:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.63 KB, patch)
2020-08-21 18:21 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl (775 bytes, patch)
2020-09-11 13:12 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t (678 bytes, patch)
2020-09-12 22:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Update database (3.68 KB, patch)
2020-11-17 12:27 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.37 KB, patch)
2020-11-17 12:27 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.69 KB, patch)
2020-11-17 12:27 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.37 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.37 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.12 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.28 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.80 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (969 bytes, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.27 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing (1.53 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.58 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.18 KB, patch)
2020-11-17 12:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (799 bytes, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.42 KB, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.36 KB, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.14 KB, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.12 KB, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.63 KB, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl (775 bytes, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t (694 bytes, patch)
2020-11-17 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for course reserves (3.47 KB, patch)
2020-11-17 12:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for item search (3.50 KB, patch)
2020-11-17 12:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.78 KB, patch)
2021-01-29 15:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.78 KB, patch)
2021-01-29 15:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.37 KB, patch)
2021-01-29 15:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.69 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (4.37 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.37 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.12 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.28 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.80 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (969 bytes, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.27 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.58 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.18 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (799 bytes, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.42 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.36 KB, patch)
2021-01-29 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.14 KB, patch)
2021-01-29 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.12 KB, patch)
2021-01-29 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl (775 bytes, patch)
2021-01-29 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t (694 bytes, patch)
2021-01-29 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for course reserves (3.47 KB, patch)
2021-01-29 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for item search (3.50 KB, patch)
2021-01-29 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.67 KB, patch)
2021-01-29 15:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.78 KB, patch)
2021-04-23 11:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.78 KB, patch)
2021-04-23 11:31 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.37 KB, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.69 KB, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (3.42 KB, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.37 KB, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.12 KB, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.43 KB, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.80 KB, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (969 bytes, patch)
2021-04-23 11:32 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.27 KB, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.58 KB, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.18 KB, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (799 bytes, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.42 KB, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.36 KB, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.13 KB, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.12 KB, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl (775 bytes, patch)
2021-04-23 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for course reserves (3.47 KB, patch)
2021-04-23 11:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for item search (3.50 KB, patch)
2021-04-23 11:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.67 KB, patch)
2021-04-23 11:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.42 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.74 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (3.47 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.42 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.17 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.47 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.85 KB, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (1018 bytes, patch)
2021-06-10 13:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.31 KB, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.63 KB, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.23 KB, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (848 bytes, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.46 KB, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.39 KB, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.18 KB, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.17 KB, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl (824 bytes, patch)
2021-06-10 13:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for course reserves (3.52 KB, patch)
2021-06-10 13:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for item search (3.55 KB, patch)
2021-06-10 13:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.72 KB, patch)
2021-06-10 13:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2021-08-31 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.42 KB, patch)
2021-08-31 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.74 KB, patch)
2021-08-31 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (3.47 KB, patch)
2021-08-31 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.42 KB, patch)
2021-08-31 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.17 KB, patch)
2021-08-31 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.47 KB, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.85 KB, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (1018 bytes, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.31 KB, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.63 KB, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (2.23 KB, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (848 bytes, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.46 KB, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit (1.33 KB, patch)
2021-08-31 13:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (4.23 KB, patch)
2021-08-31 13:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.17 KB, patch)
2021-08-31 13:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl (824 bytes, patch)
2021-08-31 13:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for course reserves (3.57 KB, patch)
2021-08-31 13:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for item search (3.54 KB, patch)
2021-08-31 13:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.72 KB, patch)
2021-08-31 13:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (follow-up) Fix spelling (979 bytes, patch)
2021-08-31 13:55 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: (follow-up) Don't filter if no libraries are restricted (1.15 KB, patch)
2021-09-01 12:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2021-12-20 12:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.42 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.74 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (3.47 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.43 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.14 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.32 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.39 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (1020 bytes, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.32 KB, patch)
2021-12-20 12:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.63 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (1.90 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (850 bytes, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.47 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (1.29 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.17 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for course reserves (3.58 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for item search (3.55 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.72 KB, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (follow-up) Fix spelling (981 bytes, patch)
2021-12-20 13:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: Update database (3.83 KB, patch)
2022-03-14 22:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Add new permission to editor (1.42 KB, patch)
2022-03-14 22:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use (3.74 KB, patch)
2022-03-14 22:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Add new methods for checking item editing permissions (3.47 KB, patch)
2022-03-14 22:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Update groups editor (9.42 KB, patch)
2022-03-14 22:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Use new methods (7.14 KB, patch)
2022-03-14 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Add unit tests (5.32 KB, patch)
2022-03-14 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove double negative from code (2.38 KB, patch)
2022-03-14 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Change meaning should change code (1018 bytes, patch)
2022-03-14 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) test borrowernumber in userenv too (1.32 KB, patch)
2022-03-14 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited (1.63 KB, patch)
2022-03-14 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item (1.89 KB, patch)
2022-03-14 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Handle non-existing userenv (848 bytes, patch)
2022-03-14 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well (1.46 KB, patch)
2022-03-14 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for (1.29 KB, patch)
2022-03-14 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Mark ft_limit_item_editing as boolean in schema file (1.17 KB, patch)
2022-03-14 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for course reserves (3.57 KB, patch)
2022-03-14 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Implement for item search (3.54 KB, patch)
2022-03-14 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: Update DB Schema [DO NOT PUSH] (1.72 KB, patch)
2022-03-14 22:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (follow-up) Fix spelling (979 bytes, patch)
2022-03-14 22:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t (678 bytes, patch)
2022-03-14 22:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix typo in comment on kohastructure.sql (1.27 KB, patch)
2022-03-14 22:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Remove duplicated sub (1.76 KB, patch)
2022-03-29 17:35 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Update permission descriptions (1.40 KB, patch)
2022-03-29 17:41 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Update group feature description (1.16 KB, patch)
2022-03-29 17:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix typo in permission descriptions (1.41 KB, patch)
2022-04-03 11:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) hide Edit chooice in Actions on items editor if item cannot be edited (2.85 KB, patch)
2022-04-29 12:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Allow removal of course reserves for items that cannot be edited (2.67 KB, patch)
2022-04-29 12:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 20256: (QA follow-up) Fix explosion for items batch edit (1.14 KB, patch)
2022-04-29 12:05 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2018-02-21 08:00:10 UTC
A.) Base work off of bug 18403
B.) Add limit for items in similar manner that 18403 does for patrons
Comment 1 Kyle M Hall 2019-03-29 18:58:44 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2019-03-29 18:58:54 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2019-03-29 18:58:57 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2019-03-29 18:59:00 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2019-03-29 18:59:03 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2019-03-29 18:59:06 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2019-03-29 18:59:10 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2019-03-29 18:59:13 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2019-03-29 19:38:48 UTC
Needs a test plan...
Comment 10 Kyle M Hall 2019-04-01 10:17:47 UTC Comment hidden (obsolete)
Comment 11 Kyle M Hall 2019-04-01 10:52:02 UTC Comment hidden (obsolete)
Comment 12 Kyle M Hall 2019-04-01 10:52:11 UTC Comment hidden (obsolete)
Comment 13 Kyle M Hall 2019-04-01 10:52:14 UTC Comment hidden (obsolete)
Comment 14 Kyle M Hall 2019-04-01 10:52:17 UTC Comment hidden (obsolete)
Comment 15 Kyle M Hall 2019-04-01 10:52:20 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall 2019-04-01 10:52:23 UTC Comment hidden (obsolete)
Comment 17 Kyle M Hall 2019-04-01 10:52:25 UTC Comment hidden (obsolete)
Comment 18 Kyle M Hall 2019-04-01 10:52:28 UTC Comment hidden (obsolete)
Comment 19 Kyle M Hall 2019-04-23 16:39:19 UTC Comment hidden (obsolete)
Comment 20 Kyle M Hall 2019-04-23 16:40:47 UTC Comment hidden (obsolete)
Comment 21 Kyle M Hall 2019-04-23 16:40:54 UTC Comment hidden (obsolete)
Comment 22 Kyle M Hall 2019-04-23 16:40:56 UTC Comment hidden (obsolete)
Comment 23 Kyle M Hall 2019-04-23 16:40:59 UTC Comment hidden (obsolete)
Comment 24 Kyle M Hall 2019-04-23 16:41:02 UTC Comment hidden (obsolete)
Comment 25 Kyle M Hall 2019-04-23 16:41:04 UTC Comment hidden (obsolete)
Comment 26 Kyle M Hall 2019-04-23 16:41:07 UTC Comment hidden (obsolete)
Comment 27 Kyle M Hall 2019-04-23 16:41:10 UTC Comment hidden (obsolete)
Comment 28 Josef Moravec 2019-04-24 13:11:15 UTC Comment hidden (obsolete)
Comment 29 Josef Moravec 2019-04-24 13:12:23 UTC
Comment on attachment 88543 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Review of attachment 88543 [details] [review]:
-----------------------------------------------------------------

::: Koha/Patron.pm
@@ +1147,5 @@
>  }
>  
> +=head3 libraries_where_can_see_patrons
> +
> +my $libraries = $patron-libraries_where_can_see_patrons;

Should be
$patron->libraries_where_can_see_patrons;

missing ">" character
Comment 30 Josef Moravec 2019-04-24 13:25:56 UTC
I think it is great enhancement, just need to polish some little issues ;)
Comment 31 Kyle M Hall 2019-04-24 15:03:11 UTC
Comment on attachment 88546 [details] [review]
Bug 20256: Use new methods

Review of attachment 88546 [details] [review]:
-----------------------------------------------------------------

::: C4/Items.pm
@@ +1746,4 @@
>          $status = "book_on_loan";
>      }
>      elsif ( defined C4::Context->userenv
> +         and !Koha::Patrons->find( C4::Context->userenv->{number} )->can_edit_item( $item ) )

cli scripts have no userenv, so this is cli safe.

::: catalogue/detail.pl
@@ +340,4 @@
>          $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} );
>      }
>  
> +    $item->{cannot_be_edited} = !$patron->can_edit_item( $item_object );

Fair enough. I'll submit a followup for fix that!
Comment 32 Kyle M Hall 2019-04-24 15:05:02 UTC Comment hidden (obsolete)
Comment 33 Josef Moravec 2019-04-25 06:05:27 UTC
(In reply to Kyle M Hall from comment #31)
> Comment on attachment 88546 [details] [review] [review]
> Bug 20256: Use new methods
> 
> Review of attachment 88546 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: C4/Items.pm
> @@ +1746,4 @@
> >          $status = "book_on_loan";
> >      }
> >      elsif ( defined C4::Context->userenv
> > +         and !Koha::Patrons->find( C4::Context->userenv->{number} )->can_edit_item( $item ) )
> 
> cli scripts have no userenv, so this is cli safe.


Sorry, I totally misread the code, you are right
Comment 34 Josef Moravec 2019-04-25 07:10:45 UTC Comment hidden (obsolete)
Comment 35 Josef Moravec 2019-04-25 07:48:08 UTC Comment hidden (obsolete)
Comment 36 Josef Moravec 2019-04-25 07:48:12 UTC Comment hidden (obsolete)
Comment 37 Josef Moravec 2019-04-25 07:48:15 UTC Comment hidden (obsolete)
Comment 38 Josef Moravec 2019-04-25 07:48:18 UTC Comment hidden (obsolete)
Comment 39 Josef Moravec 2019-04-25 07:52:05 UTC
(In reply to Josef Moravec from comment #33)
> (In reply to Kyle M Hall from comment #31)
> > Comment on attachment 88546 [details] [review] [review] [review]
> > Bug 20256: Use new methods
> > 
> > Review of attachment 88546 [details] [review] [review] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: C4/Items.pm
> > @@ +1746,4 @@
> > >          $status = "book_on_loan";
> > >      }
> > >      elsif ( defined C4::Context->userenv
> > > +         and !Koha::Patrons->find( C4::Context->userenv->{number} )->can_edit_item( $item ) )
> > 
> > cli scripts have no userenv, so this is cli safe.
> 
> 
> Sorry, I totally misread the code, you are right

I misread the code, but it is still valid, since bug 22600 added userenv to commandline/cron scripts...

I added follow-up for this and for some other minor issues.

But there is still one bigger problem: On biblio detail page, the checkbox is shown only when user can edit the item, but the edit button in the most right column of items table does not respect this logic. Even worse, I am able to edit the item, when i click it or reach the edit item form directly. This should be fixed on module level I think...
Comment 40 Kyle M Hall 2019-04-26 14:59:37 UTC Comment hidden (obsolete)
Comment 41 Kyle M Hall 2019-04-26 14:59:47 UTC Comment hidden (obsolete)
Comment 42 Jonathan Druart 2019-05-08 19:16:06 UTC
Quick review:

1. ->can_edit_item
    if ( C4::Context->preference('IndependentBranches') ) {
        return $userenv->{branch} eq $branchcode;
    }    

We certainly want to handle non-existing $userenv


2. On update, should not we set edit_any_item for patrons who where already allowed to edit items?

3. on /cataloguing/additem.pl, the whole dropdown list (edit, delete, print, etc.) is not displayed, I would expect to see some of them

4. You can add items to other libraries but then you cannot longer edit them?
Maybe add and update should be impacted by this change?

5. Restriction is only done at template level (at least for batchMod), there should be a low level exception raised if the logged in user is trying to edit/delete (add?) an item outside of their group.
Comment 43 Katrin Fischer 2019-05-11 20:14:29 UTC
Patches still apply, QA tools look good. Can you please take a look at Joubu's questions on comment 42? I think it would be nice to also limit update and add... as otherwise this leaves potential for 'locking yourself out' of an item you just added.
Comment 44 Kyle M Hall 2019-12-05 12:05:51 UTC Comment hidden (obsolete)
Comment 45 Kyle M Hall 2019-12-05 12:06:24 UTC Comment hidden (obsolete)
Comment 46 Kyle M Hall 2019-12-05 12:06:33 UTC Comment hidden (obsolete)
Comment 47 Kyle M Hall 2019-12-05 12:06:37 UTC Comment hidden (obsolete)
Comment 48 Kyle M Hall 2019-12-05 12:06:41 UTC Comment hidden (obsolete)
Comment 49 Kyle M Hall 2019-12-05 12:06:44 UTC Comment hidden (obsolete)
Comment 50 Kyle M Hall 2019-12-05 12:06:48 UTC Comment hidden (obsolete)
Comment 51 Kyle M Hall 2019-12-05 12:06:52 UTC Comment hidden (obsolete)
Comment 52 Kyle M Hall 2019-12-05 12:06:55 UTC Comment hidden (obsolete)
Comment 53 Kyle M Hall 2019-12-05 12:06:58 UTC Comment hidden (obsolete)
Comment 54 Kyle M Hall 2019-12-05 12:07:02 UTC Comment hidden (obsolete)
Comment 55 Kyle M Hall 2019-12-05 12:07:05 UTC Comment hidden (obsolete)
Comment 56 Kyle M Hall 2019-12-05 12:07:08 UTC Comment hidden (obsolete)
Comment 57 Kyle M Hall 2019-12-05 12:07:11 UTC Comment hidden (obsolete)
Comment 58 Kyle M Hall 2019-12-05 12:07:15 UTC Comment hidden (obsolete)
Comment 59 Kyle M Hall 2019-12-05 12:07:18 UTC Comment hidden (obsolete)
Comment 60 Kyle M Hall 2019-12-05 12:07:21 UTC Comment hidden (obsolete)
Comment 61 Kyle M Hall 2019-12-05 12:07:24 UTC Comment hidden (obsolete)
Comment 62 Kyle M Hall 2019-12-05 12:07:27 UTC Comment hidden (obsolete)
Comment 63 Jonathan Druart 2019-12-05 14:16:37 UTC
Hi Kyle,

I am not able to test:
Can't call method "libraries_where_can_edit_items" on an undefined value at /kohadevbox/koha/cataloguing/additem.pl line 178

Also, do not you think "edit_any_items" description should refer to "libraries in the same group" and not only "home library"?
Comment 64 Jonathan Druart 2019-12-10 14:18:39 UTC
*** Bug 22923 has been marked as a duplicate of this bug. ***
Comment 65 Kyle M Hall 2020-04-09 14:42:54 UTC Comment hidden (obsolete)
Comment 66 Kyle M Hall 2020-04-09 14:44:51 UTC Comment hidden (obsolete)
Comment 67 Kyle M Hall 2020-04-09 14:45:11 UTC
Created attachment 102624 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.
Comment 68 Kyle M Hall 2020-04-09 14:45:24 UTC
Created attachment 102625 [details] [review]
Bug 20256: Add new permission to editor
Comment 69 Kyle M Hall 2020-04-09 14:45:28 UTC
Created attachment 102626 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use
Comment 70 Kyle M Hall 2020-04-09 14:45:31 UTC
Created attachment 102627 [details] [review]
Bug 20256: Add new methods for checking item editing permissions
Comment 71 Kyle M Hall 2020-04-09 14:45:35 UTC
Created attachment 102628 [details] [review]
Bug 20256: Update groups editor
Comment 72 Kyle M Hall 2020-04-09 14:45:39 UTC
Created attachment 102629 [details] [review]
Bug 20256: Use new methods
Comment 73 Kyle M Hall 2020-04-09 14:45:42 UTC
Created attachment 102630 [details] [review]
Bug 20256: Add unit tests
Comment 74 Kyle M Hall 2020-04-09 14:45:46 UTC
Created attachment 102631 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code
Comment 75 Kyle M Hall 2020-04-09 14:45:49 UTC
Created attachment 102632 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code
Comment 76 Kyle M Hall 2020-04-09 14:45:53 UTC
Created attachment 102633 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly
Comment 77 Kyle M Hall 2020-04-09 14:45:56 UTC
Created attachment 102634 [details] [review]
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing
Comment 78 Kyle M Hall 2020-04-09 14:46:00 UTC
Created attachment 102635 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited
Comment 79 Kyle M Hall 2020-04-09 14:46:04 UTC
Created attachment 102636 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item
Comment 80 Kyle M Hall 2020-04-09 14:46:08 UTC
Created attachment 102637 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv
Comment 81 Kyle M Hall 2020-04-09 14:46:12 UTC
Created attachment 102638 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well
Comment 82 Kyle M Hall 2020-04-09 14:46:15 UTC
Created attachment 102639 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit
Comment 83 Kyle M Hall 2020-04-09 14:46:19 UTC
Created attachment 102640 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for
Comment 84 Kyle M Hall 2020-04-09 14:46:22 UTC
Created attachment 102641 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file
Comment 85 Kyle M Hall 2020-04-09 14:46:26 UTC
Created attachment 102642 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]
Comment 86 Owen Leonard 2020-04-10 11:35:29 UTC
In my tests this is working correctly. I would like to have a more thorough test plan because I worry I was missing something I should have been looking at.

However, there are a couple of complaints by the QA tool which need to be addressed.
Comment 87 Kyle M Hall 2020-04-10 13:08:11 UTC
Created attachment 102703 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.
Comment 88 Kyle M Hall 2020-04-10 13:08:36 UTC
Created attachment 102704 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.
Comment 89 Kyle M Hall 2020-04-10 13:08:51 UTC
Created attachment 102705 [details] [review]
Bug 20256: Add new permission to editor
Comment 90 Kyle M Hall 2020-04-10 13:08:56 UTC
Created attachment 102706 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use
Comment 91 Kyle M Hall 2020-04-10 13:09:00 UTC
Created attachment 102707 [details] [review]
Bug 20256: Add new methods for checking item editing permissions
Comment 92 Kyle M Hall 2020-04-10 13:09:04 UTC
Created attachment 102708 [details] [review]
Bug 20256: Update groups editor
Comment 93 Kyle M Hall 2020-04-10 13:09:08 UTC
Created attachment 102709 [details] [review]
Bug 20256: Use new methods
Comment 94 Kyle M Hall 2020-04-10 13:09:12 UTC
Created attachment 102710 [details] [review]
Bug 20256: Add unit tests
Comment 95 Kyle M Hall 2020-04-10 13:09:16 UTC
Created attachment 102711 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code
Comment 96 Kyle M Hall 2020-04-10 13:09:20 UTC
Created attachment 102712 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code
Comment 97 Kyle M Hall 2020-04-10 13:09:25 UTC
Created attachment 102713 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly
Comment 98 Kyle M Hall 2020-04-10 13:09:29 UTC
Created attachment 102714 [details] [review]
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing
Comment 99 Kyle M Hall 2020-04-10 13:09:32 UTC
Created attachment 102715 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited
Comment 100 Kyle M Hall 2020-04-10 13:09:36 UTC
Created attachment 102716 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item
Comment 101 Kyle M Hall 2020-04-10 13:09:40 UTC
Created attachment 102717 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv
Comment 102 Kyle M Hall 2020-04-10 13:09:44 UTC
Created attachment 102718 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well
Comment 103 Kyle M Hall 2020-04-10 13:09:48 UTC
Created attachment 102719 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit
Comment 104 Kyle M Hall 2020-04-10 13:09:52 UTC
Created attachment 102720 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for
Comment 105 Kyle M Hall 2020-04-10 13:09:56 UTC
Created attachment 102721 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file
Comment 106 Kyle M Hall 2020-04-10 13:10:00 UTC
Created attachment 102722 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]
Comment 107 Kyle M Hall 2020-04-10 16:28:51 UTC
Test Plan:
* Apply this patch set
* Run updatedatabase.pl
* Restart all the things!
* Create two library groups with half the libraries in each
* Enable the new item editing limits for the groups
* Note you can now only edit items from the same group as your logged in users home library
* Verify you cannot edit other library group's items using the batch item editor
* Give your user the new "edit_any_item" user permission, verify the user can now edit any item
Comment 108 Kyle M Hall 2020-04-10 16:31:10 UTC
Created attachment 102732 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 109 Kyle M Hall 2020-04-10 16:31:46 UTC
Created attachment 102733 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 110 Kyle M Hall 2020-04-10 16:31:56 UTC
Created attachment 102734 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 111 Kyle M Hall 2020-04-10 16:32:00 UTC
Created attachment 102735 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 112 Kyle M Hall 2020-04-10 16:32:04 UTC
Created attachment 102736 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 113 Kyle M Hall 2020-04-10 16:32:08 UTC
Created attachment 102737 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 114 Kyle M Hall 2020-04-10 16:32:12 UTC
Created attachment 102738 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 115 Kyle M Hall 2020-04-10 16:32:16 UTC
Created attachment 102739 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 116 Kyle M Hall 2020-04-10 16:32:21 UTC
Created attachment 102740 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 117 Kyle M Hall 2020-04-10 16:32:26 UTC
Created attachment 102741 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 118 Kyle M Hall 2020-04-10 16:32:31 UTC
Created attachment 102742 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 119 Kyle M Hall 2020-04-10 16:32:35 UTC
Created attachment 102743 [details] [review]
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 120 Kyle M Hall 2020-04-10 16:32:40 UTC
Created attachment 102744 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 121 Kyle M Hall 2020-04-10 16:32:44 UTC
Created attachment 102745 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 122 Kyle M Hall 2020-04-10 16:32:48 UTC
Created attachment 102746 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 123 Kyle M Hall 2020-04-10 16:32:52 UTC
Created attachment 102747 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 124 Kyle M Hall 2020-04-10 16:32:56 UTC
Created attachment 102748 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 125 Kyle M Hall 2020-04-10 16:33:01 UTC
Created attachment 102749 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 126 Kyle M Hall 2020-04-10 16:33:05 UTC
Created attachment 102750 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 127 Kyle M Hall 2020-04-10 16:33:09 UTC
Created attachment 102751 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 128 Katrin Fischer 2020-07-05 01:11:09 UTC
Patches curently no longer apply, can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 20256: Update database
Applying: Bug 20256: Add new permission to editor
Applying: Bug 20256: Refactor subs for rights to view patrons to make them generic for general use
Applying: Bug 20256: Add new methods for checking item editing permissions
Applying: Bug 20256: Update groups editor
Applying: Bug 20256: Use new methods
Applying: Bug 20256: Add unit tests
Using index info to reconstruct a base tree...
M	t/db_dependent/Koha/Patrons.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Koha/Patrons.t
Applying: Bug 20256: (QA follow-up) Remove double negative from code
Applying: Bug 20256: (QA follow-up) Change meaning should change code
Applying: Bug 20256: (QA follow-up) test borrowernumber in userenv too
Applying: Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing
Applying: Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited
Applying: Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item
Applying: Bug 20256: (QA follow-up) Handle non-existing userenv
Applying: Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well
Applying: Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit
.git/rebase-apply/patch:14: trailing whitespace.
	my $i = 1; 
error: sha1 information is lacking or useless (tools/batchMod.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-20256-QA-follow-up-Skip-batch-editing-items-th-PQV8Ge.patch
Comment 129 Kyle M Hall 2020-07-24 11:34:51 UTC
Created attachment 107312 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 130 Kyle M Hall 2020-07-24 11:35:01 UTC
Created attachment 107313 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 131 Kyle M Hall 2020-07-24 11:35:06 UTC
Created attachment 107314 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 132 Kyle M Hall 2020-07-24 11:35:10 UTC
Created attachment 107315 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 133 Kyle M Hall 2020-07-24 11:35:14 UTC
Created attachment 107316 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 134 Kyle M Hall 2020-07-24 11:35:20 UTC
Created attachment 107317 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 135 Kyle M Hall 2020-07-24 11:35:24 UTC
Created attachment 107318 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 136 Kyle M Hall 2020-07-24 11:35:30 UTC
Created attachment 107319 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 137 Kyle M Hall 2020-07-24 11:35:34 UTC
Created attachment 107320 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 138 Kyle M Hall 2020-07-24 11:35:39 UTC
Created attachment 107321 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 139 Kyle M Hall 2020-07-24 11:35:43 UTC
Created attachment 107322 [details] [review]
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 140 Kyle M Hall 2020-07-24 11:35:48 UTC
Created attachment 107323 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 141 Kyle M Hall 2020-07-24 11:35:51 UTC
Created attachment 107324 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 142 Kyle M Hall 2020-07-24 11:35:56 UTC
Created attachment 107325 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 143 Kyle M Hall 2020-07-24 11:36:01 UTC
Created attachment 107326 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 144 Kyle M Hall 2020-07-24 11:36:05 UTC
Created attachment 107327 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 145 Kyle M Hall 2020-07-24 11:36:10 UTC
Created attachment 107328 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 146 Kyle M Hall 2020-07-24 11:36:14 UTC
Created attachment 107329 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 147 Kyle M Hall 2020-07-24 11:36:18 UTC
Created attachment 107330 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 148 Katrin Fischer 2020-08-16 22:22:14 UTC
This no longer applies, please rebase!

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 20256: Update database
Applying: Bug 20256: Add new permission to editor
Applying: Bug 20256: Refactor subs for rights to view patrons to make them generic for general use
Applying: Bug 20256: Add new methods for checking item editing permissions
Applying: Bug 20256: Update groups editor
Applying: Bug 20256: Use new methods
Using index info to reconstruct a base tree...
M	Koha/Item.pm
M	catalogue/detail.pl
M	catalogue/moredetail.pl
M	cataloguing/additem.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
M	tools/batchMod.pl
Falling back to patching base and 3-way merge...
Auto-merging tools/batchMod.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
Auto-merging cataloguing/additem.pl
Auto-merging catalogue/moredetail.pl
Auto-merging catalogue/detail.pl
Auto-merging Koha/Item.pm
Applying: Bug 20256: Add unit tests
Applying: Bug 20256: (QA follow-up) Remove double negative from code
Applying: Bug 20256: (QA follow-up) Change meaning should change code
Applying: Bug 20256: (QA follow-up) test borrowernumber in userenv too
Applying: Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing
Applying: Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited
Applying: Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item
error: sha1 information is lacking or useless (cataloguing/additem.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-20256-QA-follow-up-Redirect-to-record-details--3RxR9W.patch
Comment 149 Kyle M Hall 2020-08-21 18:17:24 UTC
Created attachment 108851 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 150 Kyle M Hall 2020-08-21 18:19:34 UTC
Created attachment 108852 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 151 Kyle M Hall 2020-08-21 18:19:46 UTC
Created attachment 108853 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 152 Kyle M Hall 2020-08-21 18:19:52 UTC
Created attachment 108854 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 153 Kyle M Hall 2020-08-21 18:19:56 UTC
Created attachment 108855 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 154 Kyle M Hall 2020-08-21 18:20:02 UTC
Created attachment 108856 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 155 Kyle M Hall 2020-08-21 18:20:06 UTC
Created attachment 108857 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 156 Kyle M Hall 2020-08-21 18:20:11 UTC
Created attachment 108858 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 157 Kyle M Hall 2020-08-21 18:20:16 UTC
Created attachment 108859 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 158 Kyle M Hall 2020-08-21 18:20:20 UTC
Created attachment 108860 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 159 Kyle M Hall 2020-08-21 18:20:26 UTC
Created attachment 108861 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 160 Kyle M Hall 2020-08-21 18:20:31 UTC
Created attachment 108862 [details] [review]
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 161 Kyle M Hall 2020-08-21 18:20:35 UTC
Created attachment 108863 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 162 Kyle M Hall 2020-08-21 18:20:40 UTC
Created attachment 108864 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 163 Kyle M Hall 2020-08-21 18:20:45 UTC
Created attachment 108865 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 164 Kyle M Hall 2020-08-21 18:20:49 UTC
Created attachment 108866 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 165 Kyle M Hall 2020-08-21 18:20:54 UTC
Created attachment 108867 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 166 Kyle M Hall 2020-08-21 18:20:58 UTC
Created attachment 108868 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 167 Kyle M Hall 2020-08-21 18:21:03 UTC
Created attachment 108869 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 168 Kyle M Hall 2020-08-21 18:21:08 UTC
Created attachment 108870 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 169 Katrin Fischer 2020-08-21 22:25:33 UTC
Hi Kyle,

first review here:

1) QA tools:

FAIL	cataloguing/additem.pl
   FAIL	  valid
		"my" variable $item masks earlier declaration in same scope 

2) Unit tests

Ran the database update, but tests are failing:

kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/db_dependent/Koha/Patrons.t
t/db_dependent/Koha/Patrons.t .. 33/41 DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry 'OPLKEwkZw0DMeIN2d05GnFYtiGaCnqBtN4N03FSuWrNz' for key 'userid' [for Statement "UPDATE `borrowers` SET `userid` = ? WHERE ( `borrowernumber` = ? )" with ParamValues: 0='OPLKEwkZw0DMeIN2d05GnFYtiGaCnqBtN4N03FSuWrNz', 1='199'] at /home/vagrant/kohaclone/Koha/Object.pm line 166
t/db_dependent/Koha/Patrons.t .. 42/41 # Looks like you planned 41 tests but ran 42.
t/db_dependent/Koha/Patrons.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
All 41 subtests passed 

Test Summary Report
-------------------
t/db_dependent/Koha/Patrons.t (Wstat: 65280 Tests: 42 Failed: 1)
  Failed test:  42
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 41 tests but ran 42.

3) Methods

libraries_where_can_see_patrons is added to Patron.pm 
I am not sure how it fits into this functionality, maybe a leftover from an earlier development?

4) Item edit checks

I think we might also need a check on the permission from the item search edit item link.
Comment 170 Kyle M Hall 2020-09-11 13:12:03 UTC
Created attachment 109939 [details] [review]
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl
Comment 171 Kyle M Hall 2020-09-11 15:22:15 UTC
> 1) QA tools:
> 
> FAIL	cataloguing/additem.pl
>    FAIL	  valid
> 		"my" variable $item masks earlier declaration in same scope 

Fixed!

> 2) Unit tests
> 
> Ran the database update, but tests are failing:

I wasn't able to recreate your unit test failure. Can you try again?

> 3) Methods
> 
> libraries_where_can_see_patrons is added to Patron.pm 
> I am not sure how it fits into this functionality, maybe a leftover from an
> earlier development?

This subroutine is from Jonathan's patch that added group limits for viewing patrons. This patch set takes that logic and makes it more generic for use with other objects that also have branchcodes. libraries_where_can_see_patrons is the specific implementation for jonathans previous feature, which is now a wrapper around the more generic method that can also be used for items and other objects in the future.

 
> 4) Item edit checks
> 
> I think we might also need a check on the permission from the item search
> edit item link.

I've been working on this patch, but it occurs to me that the edit item link shows even if a record has no items. It's a useful way to go straight to the items editor to create a new item. As such, I don't think we should hide the link because it can still be used in that way even if the librarian can't edit any existing items.
Comment 172 Katrin Fischer 2020-09-12 09:52:07 UTC
> > 4) Item edit checks
> > 
> > I think we might also need a check on the permission from the item search
> > edit item link.
> 
> I've been working on this patch, but it occurs to me that the edit item link
> shows even if a record has no items. It's a useful way to go straight to the
> items editor to create a new item. As such, I don't think we should hide the
> link because it can still be used in that way even if the librarian can't
> edit any existing items.

Hi Kyle, I meant the "item search" - in this case the form for editing this specific item opens. So I think it makes sense to hide it there and I think there is already some logic for that now.
Comment 173 Katrin Fischer 2020-09-12 22:43:05 UTC
Created attachment 110005 [details] [review]
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t
Comment 174 Katrin Fischer 2020-09-12 22:44:05 UTC
(In reply to Katrin Fischer from comment #172)
> > > 4) Item edit checks
> > > 
> > > I think we might also need a check on the permission from the item search
> > > edit item link.
> > 
> > I've been working on this patch, but it occurs to me that the edit item link
> > shows even if a record has no items. It's a useful way to go straight to the
> > items editor to create a new item. As such, I don't think we should hide the
> > link because it can still be used in that way even if the librarian can't
> > edit any existing items.
> 
> Hi Kyle, I meant the "item search" - in this case the form for editing this
> specific item opens. So I think it makes sense to hide it there and I think
> there is already some logic for that now.
I identified 3 places now that require action:

- Edit item link from course reserves
- Edit item link form item search (not catalog search)
- Edit item link from items tab (moredetail.pl)
Comment 175 Kyle M Hall 2020-11-17 12:27:30 UTC
Created attachment 113706 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 176 Kyle M Hall 2020-11-17 12:27:47 UTC
Created attachment 113707 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 177 Kyle M Hall 2020-11-17 12:27:54 UTC
Created attachment 113708 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 178 Kyle M Hall 2020-11-17 12:28:00 UTC
Created attachment 113709 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 179 Kyle M Hall 2020-11-17 12:28:06 UTC
Created attachment 113710 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 180 Kyle M Hall 2020-11-17 12:28:13 UTC
Created attachment 113711 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 181 Kyle M Hall 2020-11-17 12:28:18 UTC
Created attachment 113712 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 182 Kyle M Hall 2020-11-17 12:28:23 UTC
Created attachment 113713 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 183 Kyle M Hall 2020-11-17 12:28:30 UTC
Created attachment 113714 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 184 Kyle M Hall 2020-11-17 12:28:36 UTC
Created attachment 113715 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 185 Kyle M Hall 2020-11-17 12:28:42 UTC
Created attachment 113716 [details] [review]
Bug 20256: (QA follow-up) Fix column description for ft_limit_item_editing

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 186 Kyle M Hall 2020-11-17 12:28:48 UTC
Created attachment 113717 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 187 Kyle M Hall 2020-11-17 12:28:55 UTC
Created attachment 113718 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 188 Kyle M Hall 2020-11-17 12:29:02 UTC
Created attachment 113719 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 189 Kyle M Hall 2020-11-17 12:29:11 UTC
Created attachment 113720 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 190 Kyle M Hall 2020-11-17 12:29:19 UTC
Created attachment 113721 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 191 Kyle M Hall 2020-11-17 12:29:27 UTC
Created attachment 113722 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 192 Kyle M Hall 2020-11-17 12:29:33 UTC
Created attachment 113723 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 193 Kyle M Hall 2020-11-17 12:29:40 UTC
Created attachment 113724 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 194 Kyle M Hall 2020-11-17 12:29:48 UTC
Created attachment 113725 [details] [review]
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl
Comment 195 Kyle M Hall 2020-11-17 12:29:54 UTC
Created attachment 113726 [details] [review]
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t
Comment 196 Kyle M Hall 2020-11-17 12:30:01 UTC
Created attachment 113727 [details] [review]
Bug 20256: (QA follow-up) Implement for course reserves
Comment 197 Kyle M Hall 2020-11-17 12:30:08 UTC
Created attachment 113728 [details] [review]
Bug 20256: (QA follow-up) Implement for item search
Comment 198 Kyle M Hall 2020-11-17 13:52:52 UTC
(In reply to Katrin Fischer from comment #174)
> (In reply to Katrin Fischer from comment #172)
> > > > 4) Item edit checks
> > > > 
> > > > I think we might also need a check on the permission from the item search
> > > > edit item link.
> > > 
> > > I've been working on this patch, but it occurs to me that the edit item link
> > > shows even if a record has no items. It's a useful way to go straight to the
> > > items editor to create a new item. As such, I don't think we should hide the
> > > link because it can still be used in that way even if the librarian can't
> > > edit any existing items.
> > 
> > Hi Kyle, I meant the "item search" - in this case the form for editing this
> > specific item opens. So I think it makes sense to hide it there and I think
> > there is already some logic for that now.
> I identified 3 places now that require action:
> 
> - Edit item link from course reserves
> - Edit item link form item search (not catalog search)
> - Edit item link from items tab (moredetail.pl)

The edit item link on moredetail.pl was already implemented, is it not working for you?
Comment 199 Kyle M Hall 2021-01-29 15:31:52 UTC
Created attachment 116042 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 200 Kyle M Hall 2021-01-29 15:32:43 UTC
Created attachment 116043 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 201 Kyle M Hall 2021-01-29 15:32:55 UTC
Created attachment 116044 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 202 Kyle M Hall 2021-01-29 15:33:01 UTC
Created attachment 116045 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 203 Kyle M Hall 2021-01-29 15:33:06 UTC
Created attachment 116046 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 204 Kyle M Hall 2021-01-29 15:33:10 UTC
Created attachment 116047 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 205 Kyle M Hall 2021-01-29 15:33:16 UTC
Created attachment 116048 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 206 Kyle M Hall 2021-01-29 15:33:20 UTC
Created attachment 116049 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 207 Kyle M Hall 2021-01-29 15:33:25 UTC
Created attachment 116050 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 208 Kyle M Hall 2021-01-29 15:33:30 UTC
Created attachment 116051 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 209 Kyle M Hall 2021-01-29 15:33:35 UTC
Created attachment 116052 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 210 Kyle M Hall 2021-01-29 15:33:40 UTC
Created attachment 116053 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 211 Kyle M Hall 2021-01-29 15:33:44 UTC
Created attachment 116054 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 212 Kyle M Hall 2021-01-29 15:33:49 UTC
Created attachment 116055 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 213 Kyle M Hall 2021-01-29 15:33:54 UTC
Created attachment 116056 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 214 Kyle M Hall 2021-01-29 15:33:58 UTC
Created attachment 116057 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 215 Kyle M Hall 2021-01-29 15:34:03 UTC
Created attachment 116058 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 216 Kyle M Hall 2021-01-29 15:34:09 UTC
Created attachment 116059 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 217 Kyle M Hall 2021-01-29 15:34:14 UTC
Created attachment 116060 [details] [review]
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl
Comment 218 Kyle M Hall 2021-01-29 15:34:18 UTC
Created attachment 116061 [details] [review]
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t
Comment 219 Kyle M Hall 2021-01-29 15:34:23 UTC
Created attachment 116062 [details] [review]
Bug 20256: (QA follow-up) Implement for course reserves
Comment 220 Kyle M Hall 2021-01-29 15:34:28 UTC
Created attachment 116063 [details] [review]
Bug 20256: (QA follow-up) Implement for item search
Comment 221 Kyle M Hall 2021-01-29 15:34:32 UTC
Created attachment 116064 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]
Comment 222 Katrin Fischer 2021-04-22 22:30:25 UTC
Hi Kyle, could you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 20256: Update database
Applying: Bug 20256: Add new permission to editor
Applying: Bug 20256: Refactor subs for rights to view patrons to make them generic for general use
Applying: Bug 20256: Add new methods for checking item editing permissions
error: sha1 information is lacking or useless (Koha/Patron.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 20256: Add new methods for checking item editing permissions
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-20256-Add-new-methods-for-checking-item-editin-QeAIqS.patch
Comment 223 Katrin Fischer 2021-04-22 22:31:52 UTC
*** Bug 28174 has been marked as a duplicate of this bug. ***
Comment 224 Kyle M Hall 2021-04-23 11:31:17 UTC
Created attachment 120055 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 225 Kyle M Hall 2021-04-23 11:31:55 UTC
Created attachment 120056 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 226 Kyle M Hall 2021-04-23 11:32:11 UTC
Created attachment 120057 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 227 Kyle M Hall 2021-04-23 11:32:20 UTC
Created attachment 120058 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 228 Kyle M Hall 2021-04-23 11:32:26 UTC
Created attachment 120059 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 229 Kyle M Hall 2021-04-23 11:32:32 UTC
Created attachment 120060 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 230 Kyle M Hall 2021-04-23 11:32:39 UTC
Created attachment 120061 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 231 Kyle M Hall 2021-04-23 11:32:47 UTC
Created attachment 120062 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 232 Kyle M Hall 2021-04-23 11:32:53 UTC
Created attachment 120063 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 233 Kyle M Hall 2021-04-23 11:32:59 UTC
Created attachment 120064 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 234 Kyle M Hall 2021-04-23 11:33:05 UTC
Created attachment 120065 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 235 Kyle M Hall 2021-04-23 11:33:12 UTC
Created attachment 120066 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 236 Kyle M Hall 2021-04-23 11:33:18 UTC
Created attachment 120067 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 237 Kyle M Hall 2021-04-23 11:33:24 UTC
Created attachment 120068 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 238 Kyle M Hall 2021-04-23 11:33:31 UTC
Created attachment 120069 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 239 Kyle M Hall 2021-04-23 11:33:36 UTC
Created attachment 120070 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 240 Kyle M Hall 2021-04-23 11:33:43 UTC
Created attachment 120071 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 241 Kyle M Hall 2021-04-23 11:33:49 UTC
Created attachment 120072 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Comment 242 Kyle M Hall 2021-04-23 11:33:55 UTC
Created attachment 120073 [details] [review]
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl
Comment 243 Kyle M Hall 2021-04-23 11:34:01 UTC
Created attachment 120074 [details] [review]
Bug 20256: (QA follow-up) Implement for course reserves
Comment 244 Kyle M Hall 2021-04-23 11:34:07 UTC
Created attachment 120075 [details] [review]
Bug 20256: (QA follow-up) Implement for item search
Comment 245 Kyle M Hall 2021-04-23 11:34:13 UTC
Created attachment 120076 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]
Comment 246 Martin Renvoize 2021-04-26 15:12:28 UTC
This looks good to me, and in my testing, all seems to be working well.

As Katrin appears to already be most of the way through testing however.. I'll leave it to her to do the final signoff and PQA.
Comment 247 Martin Renvoize 2021-06-10 13:19:01 UTC
Created attachment 121771 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 248 Martin Renvoize 2021-06-10 13:19:08 UTC
Created attachment 121772 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 249 Martin Renvoize 2021-06-10 13:19:13 UTC
Created attachment 121773 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 250 Martin Renvoize 2021-06-10 13:19:20 UTC
Created attachment 121774 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 251 Martin Renvoize 2021-06-10 13:19:27 UTC
Created attachment 121775 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 252 Martin Renvoize 2021-06-10 13:19:33 UTC
Created attachment 121776 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 253 Martin Renvoize 2021-06-10 13:19:41 UTC
Created attachment 121777 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 254 Martin Renvoize 2021-06-10 13:19:48 UTC
Created attachment 121778 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 255 Martin Renvoize 2021-06-10 13:19:55 UTC
Created attachment 121779 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 256 Martin Renvoize 2021-06-10 13:20:01 UTC
Created attachment 121780 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 257 Martin Renvoize 2021-06-10 13:20:08 UTC
Created attachment 121781 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 258 Martin Renvoize 2021-06-10 13:20:16 UTC
Created attachment 121782 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 259 Martin Renvoize 2021-06-10 13:20:22 UTC
Created attachment 121783 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 260 Martin Renvoize 2021-06-10 13:20:28 UTC
Created attachment 121785 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 261 Martin Renvoize 2021-06-10 13:20:34 UTC
Created attachment 121786 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 262 Martin Renvoize 2021-06-10 13:20:41 UTC
Created attachment 121787 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 263 Martin Renvoize 2021-06-10 13:20:47 UTC
Created attachment 121788 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 264 Martin Renvoize 2021-06-10 13:20:54 UTC
Created attachment 121789 [details] [review]
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 265 Martin Renvoize 2021-06-10 13:21:01 UTC
Created attachment 121790 [details] [review]
Bug 20256: (QA follow-up) Implement for course reserves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 266 Martin Renvoize 2021-06-10 13:21:09 UTC
Created attachment 121791 [details] [review]
Bug 20256: (QA follow-up) Implement for item search

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 267 Martin Renvoize 2021-06-10 13:21:15 UTC
Created attachment 121792 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 268 Martin Renvoize 2021-06-10 13:23:55 UTC
Minor rebase and added my SO line as I've tested this.. still think it would be good to let Katrin do the final QA
Comment 269 Katrin Fischer 2021-07-25 00:58:25 UTC
Can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 20256: Update database
Applying: Bug 20256: Add new permission to editor
Applying: Bug 20256: Refactor subs for rights to view patrons to make them generic for general use
Applying: Bug 20256: Add new methods for checking item editing permissions
Applying: Bug 20256: Update groups editor
Applying: Bug 20256: Use new methods
Applying: Bug 20256: Add unit tests
Applying: Bug 20256: (QA follow-up) Remove double negative from code
Applying: Bug 20256: (QA follow-up) Change meaning should change code
Applying: Bug 20256: (QA follow-up) test borrowernumber in userenv too
Applying: Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited
Applying: Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item
Applying: Bug 20256: (QA follow-up) Handle non-existing userenv
Applying: Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well
Applying: Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit
error: sha1 information is lacking or useless (tools/batchMod.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-20256-QA-follow-up-Skip-batch-editing-items-th-RbN33J.patch
Comment 270 Nick Clemens 2021-08-31 13:53:23 UTC
Created attachment 124286 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 271 Nick Clemens 2021-08-31 13:53:29 UTC
Created attachment 124287 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 272 Nick Clemens 2021-08-31 13:53:35 UTC
Created attachment 124288 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 273 Nick Clemens 2021-08-31 13:53:43 UTC
Created attachment 124289 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 274 Nick Clemens 2021-08-31 13:53:50 UTC
Created attachment 124290 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 275 Nick Clemens 2021-08-31 13:53:57 UTC
Created attachment 124291 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 276 Nick Clemens 2021-08-31 13:54:03 UTC
Created attachment 124292 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 277 Nick Clemens 2021-08-31 13:54:10 UTC
Created attachment 124293 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 278 Nick Clemens 2021-08-31 13:54:18 UTC
Created attachment 124294 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 279 Nick Clemens 2021-08-31 13:54:25 UTC
Created attachment 124295 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 280 Nick Clemens 2021-08-31 13:54:31 UTC
Created attachment 124296 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 281 Nick Clemens 2021-08-31 13:54:38 UTC
Created attachment 124297 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 282 Nick Clemens 2021-08-31 13:54:45 UTC
Created attachment 124298 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 283 Nick Clemens 2021-08-31 13:54:51 UTC
Created attachment 124299 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 284 Nick Clemens 2021-08-31 13:54:57 UTC
Created attachment 124300 [details] [review]
Bug 20256: (QA follow-up) Skip batch editing items the user is not allowed to edit

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 285 Nick Clemens 2021-08-31 13:55:04 UTC
Created attachment 124301 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 286 Nick Clemens 2021-08-31 13:55:10 UTC
Created attachment 124302 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 287 Nick Clemens 2021-08-31 13:55:16 UTC
Created attachment 124303 [details] [review]
Bug 20256: (QA follow-up) Fix variable masking warning in additem.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 288 Nick Clemens 2021-08-31 13:55:23 UTC
Created attachment 124304 [details] [review]
Bug 20256: (QA follow-up) Implement for course reserves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 289 Nick Clemens 2021-08-31 13:55:31 UTC
Created attachment 124305 [details] [review]
Bug 20256: (QA follow-up) Implement for item search

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 290 Nick Clemens 2021-08-31 13:55:38 UTC
Created attachment 124306 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 291 Nick Clemens 2021-08-31 13:55:47 UTC
Created attachment 124307 [details] [review]
Bug 20256: (follow-up) Fix spelling
Comment 292 Nick Clemens 2021-09-01 12:07:36 UTC
Created attachment 124321 [details] [review]
Bug 20256: (follow-up) Don't filter if no libraries are restricted
Comment 293 Katrin Fischer 2021-10-20 21:33:06 UTC
Patches no longer apply, could you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 20256: Update database
Applying: Bug 20256: Add new permission to editor
Applying: Bug 20256: Refactor subs for rights to view patrons to make them generic for general use
Applying: Bug 20256: Add new methods for checking item editing permissions
Applying: Bug 20256: Update groups editor
Applying: Bug 20256: Use new methods
Using index info to reconstruct a base tree...
M	Koha/Item.pm
M	catalogue/detail.pl
M	cataloguing/additem.pl
M	tools/batchMod.pl
Falling back to patching base and 3-way merge...
Auto-merging tools/batchMod.pl
CONFLICT (content): Merge conflict in tools/batchMod.pl
Auto-merging cataloguing/additem.pl
CONFLICT (content): Merge conflict in cataloguing/additem.pl
Auto-merging catalogue/detail.pl
Auto-merging Koha/Item.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 20256: Use new methods
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-20256-Use-new-methods-G2R6lg.patch
Comment 294 Kyle M Hall 2021-12-20 12:58:54 UTC
Created attachment 128734 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 295 Kyle M Hall 2021-12-20 12:59:07 UTC
Created attachment 128735 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 296 Kyle M Hall 2021-12-20 12:59:13 UTC
Created attachment 128736 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 297 Kyle M Hall 2021-12-20 12:59:18 UTC
Created attachment 128737 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 298 Kyle M Hall 2021-12-20 12:59:24 UTC
Created attachment 128738 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 299 Kyle M Hall 2021-12-20 12:59:30 UTC
Created attachment 128739 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 300 Kyle M Hall 2021-12-20 12:59:36 UTC
Created attachment 128740 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 301 Kyle M Hall 2021-12-20 12:59:42 UTC
Created attachment 128741 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 302 Kyle M Hall 2021-12-20 12:59:48 UTC
Created attachment 128742 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 303 Kyle M Hall 2021-12-20 12:59:54 UTC
Created attachment 128743 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 304 Kyle M Hall 2021-12-20 13:00:00 UTC
Created attachment 128744 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 305 Kyle M Hall 2021-12-20 13:00:07 UTC
Created attachment 128745 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 306 Kyle M Hall 2021-12-20 13:00:13 UTC
Created attachment 128746 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 307 Kyle M Hall 2021-12-20 13:00:19 UTC
Created attachment 128747 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 308 Kyle M Hall 2021-12-20 13:00:24 UTC
Created attachment 128748 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 309 Kyle M Hall 2021-12-20 13:00:30 UTC
Created attachment 128749 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 310 Kyle M Hall 2021-12-20 13:00:36 UTC
Created attachment 128750 [details] [review]
Bug 20256: (QA follow-up) Implement for course reserves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 311 Kyle M Hall 2021-12-20 13:00:42 UTC
Created attachment 128751 [details] [review]
Bug 20256: (QA follow-up) Implement for item search

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 312 Kyle M Hall 2021-12-20 13:00:48 UTC
Created attachment 128752 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 313 Kyle M Hall 2021-12-20 13:00:53 UTC
Created attachment 128753 [details] [review]
Bug 20256: (follow-up) Fix spelling
Comment 314 Katrin Fischer 2022-03-14 22:06:17 UTC
Created attachment 131676 [details] [review]
Bug 20256: Update database

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Create two library groups with some libraries in them,
   make sure to enable the new feature to limit editing of items
4) Test the functionality, if an item is owned by a library in
   your group, you should have full editing abilities. If an item
   is from a different group, you should only be able to make the
   same changes you would be able to if IndependentBranches were.

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 315 Katrin Fischer 2022-03-14 22:06:26 UTC
Created attachment 131677 [details] [review]
Bug 20256: Add new permission to editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 316 Katrin Fischer 2022-03-14 22:06:35 UTC
Created attachment 131678 [details] [review]
Bug 20256: Refactor subs for rights to view patrons to make them generic for general use

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 317 Katrin Fischer 2022-03-14 22:06:44 UTC
Created attachment 131679 [details] [review]
Bug 20256: Add new methods for checking item editing permissions

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 318 Katrin Fischer 2022-03-14 22:06:52 UTC
Created attachment 131680 [details] [review]
Bug 20256: Update groups editor

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 319 Katrin Fischer 2022-03-14 22:07:01 UTC
Created attachment 131681 [details] [review]
Bug 20256: Use new methods

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 320 Katrin Fischer 2022-03-14 22:07:10 UTC
Created attachment 131682 [details] [review]
Bug 20256: Add unit tests

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 321 Katrin Fischer 2022-03-14 22:07:19 UTC
Created attachment 131683 [details] [review]
Bug 20256: (QA follow-up) Remove double negative from code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 322 Katrin Fischer 2022-03-14 22:07:28 UTC
Created attachment 131684 [details] [review]
Bug 20256: (QA follow-up) Change meaning should change code

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 323 Katrin Fischer 2022-03-14 22:07:37 UTC
Created attachment 131685 [details] [review]
Bug 20256: (QA follow-up) test borrowernumber in userenv too

Bug 22600 added userenv for scripts, so userenv is defined, but some of
values in userenv not

Test plan:
Run with some params: misc/cronjobs/delete_items.pl

--> without this patch you will se error message:
    Can't call method "can_edit_item" on an undefined value at /home/vagrant/kohaclone/C4/Items.pm line 1748
--> with this patch everything works smoothly

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 324 Katrin Fischer 2022-03-14 22:07:47 UTC
Created attachment 131686 [details] [review]
Bug 20256: (QA follow-up) Fix missed change from item.cannot_be_edited to item.can_be_edited

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 325 Katrin Fischer 2022-03-14 22:07:56 UTC
Created attachment 131687 [details] [review]
Bug 20256: (QA follow-up) Redirect to record details page if user cannot edit this item

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 326 Katrin Fischer 2022-03-14 22:08:06 UTC
Created attachment 131688 [details] [review]
Bug 20256: (QA follow-up) Handle non-existing userenv

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 327 Katrin Fischer 2022-03-14 22:08:15 UTC
Created attachment 131689 [details] [review]
Bug 20256: (QA follow-up) Give existing users with edit_items permission edit_any_item as well

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 328 Katrin Fischer 2022-03-14 22:08:24 UTC
Created attachment 131690 [details] [review]
Bug 20256: (QA follow-up) Filter out branchcodes the user has no permissions for

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 329 Katrin Fischer 2022-03-14 22:08:33 UTC
Created attachment 131691 [details] [review]
Bug 20256: Mark ft_limit_item_editing as boolean in schema file

Signed-off-by: Bob Bennhoff - CLiC <bbennhoff@clicweb.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 330 Katrin Fischer 2022-03-14 22:08:42 UTC
Created attachment 131692 [details] [review]
Bug 20256: (QA follow-up) Implement for course reserves

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 331 Katrin Fischer 2022-03-14 22:08:52 UTC
Created attachment 131693 [details] [review]
Bug 20256: (QA follow-up) Implement for item search

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 332 Katrin Fischer 2022-03-14 22:09:02 UTC
Created attachment 131694 [details] [review]
Bug 20256: Update DB Schema [DO NOT PUSH]

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 333 Katrin Fischer 2022-03-14 22:09:11 UTC
Created attachment 131695 [details] [review]
Bug 20256: (follow-up) Fix spelling
Comment 334 Katrin Fischer 2022-03-14 22:09:21 UTC
Created attachment 131696 [details] [review]
Bug 20256: (QA follow-up) Fix number of tests in Patrons.t
Comment 335 Katrin Fischer 2022-03-14 22:09:30 UTC
Created attachment 131697 [details] [review]
Bug 20256: (QA follow-up) Fix typo in comment on kohastructure.sql
Comment 336 Katrin Fischer 2022-03-14 22:11:35 UTC
Patches still apply with a tiny rebase :)

I've added the rebased patch set with 2 tiny follow-ups, but have some issues I am struggling with:

1) Tests don't pass and there is a warning that might relate to some rebase issue:

kohadev-koha@kohadevbox:/kohadevbox/koha$ prove t/db_dependent/Koha/Patrons.t
t/db_dependent/Koha/Patrons.t .. Subroutine libraries_where_can_see_patrons redefined at /kohadevbox/koha/Koha/Patron.pm line 1610.

2) Permission descriptions

We now have:

* Edit any item. If not set the logged in user can only edit items whose home library matches the logged in library. (edit_any_item)
* Edit items (edit_items) 

I think we need to actually rephrase Edit items if the note on edit_any_item rings true. Also, we need to factor in the library group feature somehow...

Edit all items with user's home library and from libaries within the edit item library group (edit_items)

It makes me realize I am not super sure yet how the library groups and permissions work together, can you please check and maybe explain a little more?

3) Library groups

<li>Limit item editing for librarians outside of this group.</li>

Maybe this would be clearer as:

<li>Limit item editing to librarians inside of this group</li>

But I might be misunderstanding something?
Comment 337 Kyle M Hall 2022-03-29 17:35:32 UTC
Created attachment 132483 [details] [review]
Bug 20256: (QA follow-up) Remove duplicated sub
Comment 338 Kyle M Hall 2022-03-29 17:41:41 UTC
Created attachment 132484 [details] [review]
Bug 20256: (QA follow-up) Update permission descriptions
Comment 339 Kyle M Hall 2022-03-29 17:44:08 UTC
Created attachment 132486 [details] [review]
Bug 20256: (QA follow-up) Update group feature description
Comment 340 Kyle M Hall 2022-03-29 17:44:53 UTC
(In reply to Katrin Fischer from comment #336)
> Patches still apply with a tiny rebase :)
> 
> I've added the rebased patch set with 2 tiny follow-ups, but have some
> issues I am struggling with:
> 
> 1) Tests don't pass and there is a warning that might relate to some rebase
> issue:
> 
> kohadev-koha@kohadevbox:/kohadevbox/koha$ prove t/db_dependent/Koha/Patrons.t
> t/db_dependent/Koha/Patrons.t .. Subroutine libraries_where_can_see_patrons
> redefined at /kohadevbox/koha/Koha/Patron.pm line 1610.

Should be fixed with this latest followup!

> 
> 2) Permission descriptions
> 
> We now have:
> 
> * Edit any item. If not set the logged in user can only edit items whose
> home library matches the logged in library. (edit_any_item)
> * Edit items (edit_items) 
> 
> I think we need to actually rephrase Edit items if the note on edit_any_item
> rings true. Also, we need to factor in the library group feature somehow...
> 
> Edit all items with user's home library and from libaries within the edit
> item library group (edit_items)
> 
> It makes me realize I am not super sure yet how the library groups and
> permissions work together, can you please check and maybe explain a little
> more?

I've added a followup to update those descriptions. I think the new ones are better, but if anyone has more improvements they would be welcome!

> 
> 3) Library groups
> 
> <li>Limit item editing for librarians outside of this group.</li>
> 
> Maybe this would be clearer as:
> 
> <li>Limit item editing to librarians inside of this group</li>
> 
> But I might be misunderstanding something?

That sounds good to me!
Comment 341 Katrin Fischer 2022-04-03 11:22:30 UTC
Created attachment 132917 [details] [review]
Bug 20256: (QA follow-up) Fix typo in permission descriptions
Comment 342 Katrin Fischer 2022-04-03 11:29:58 UTC
Started to test functionality a bit more and I feel like there is a bigger issue with how this will change how item editing is set up.

We now have:
* Edit items (not including items restricted by library group) (edit_items)
* Edit any item including items that would otherwise be restricted (edit_any_item)

Test case 1:
* edit_items
* Independentbranches is off
* No library groups are set up

Items from other libraries cannot be edited.

This means that now both permissions are required in order to have the current behaviour when Independentbranches is turned off.

As the permissions for existing staff users are not updated with this patch set, it will cause a behaviour change and require a lot of config changes (depending on staff numbers) to fix.

So what can we do?

1) Update staff permissions for existing staff users. This will still mean that 2 checkboxes will have to be set to allow for full item editing.

2) Change the checks to see if there are actually any library groups for 'item edit' set up and only apply the limit if there are.

What do you think? I lean a bit more towards 2 as this will make the default config a little easier (= no restrictions set up, no restrictions applied)
Comment 343 Katrin Fischer 2022-04-03 11:33:36 UTC
Ok, I misread the database update, there actually is an update!

+    $dbh->do(q{
+        INSERT INTO user_permissions ( borrowernumber, module_bit, code )
+        SELECT borrowernumber, '9', 'edit_any_item'
+        FROM user_permissions
+        WHERE module_bit = '9'
+          AND code = 'edit_items'
+    });


Still wondering if we could get around the 2 permissions for simple item edit somehow... but maybe not.

Because: if we implemented my suggestion 2) libraries wanting to limit on home branch for editing would have to set up a group for each branch, which is also not nice. 

I'll test more!
Comment 344 Katrin Fischer 2022-04-03 12:42:05 UTC
=Testing restrictions=

Test case 1:
* edit_items = yes
* edit_any_items = no
* Independentbranches = NO
* No library groups defined

Only items from home branch can be edited.

Test case 2:
* edit_items = yes
* edit_any_items = yes
* Independentbranches = NO
* No library groups defined

All items can be edited.

Test case 3:
* edit_items = yes
* edit_any_items = no
* Independentbranches = YES
* No library groups defined

Only items from home branch can be edited. Same as with Indybranches off.

Test case 4:
* edit_items = yes
* edit_any_items = yes
* Independentbranches = YES
* No library groups defined

All items can be edited. Same as with Indybranches off.

Test case 5:
* edit_items = yes
* edit_any_items = no
* Independentbranches = YES or NO
* Library group includes staff users home branch (MPL) and other library branch (CPL)

Only items from home branch (CPL) and group library (MPL) can be edited.

Test case 6:
* edit_items = yes
* edit_any_items = yes
* Independentbranches = YES or NO
* No library groups defined

All items can be edited.

Summary:
==> The new edit_any_items overwrites the Indybranches pref. In consequence it appears it no longer has any effect. Correct?
Should we update the IndependantBranches description to reflect that?
Currently reads:
Prevent staff (but not superlibrarians) from modifying objects (holds, items, patrons, etc.) belonging to other libraries: [Yes|No]

==> We update all staff users to have edit_any_items, 
but we should possibly only update if IndependentBranches is set to off, to keep current behaviour! (blocker)


=Edit buttons=
Tested with configuration from Test case 5.

1) OK - detail page - holdings table
2) OK - detail page - items tab
3) NOT OK - item edit page
   The Edit link in the Actions menu always shows, but redirects to detail page, if no permission.
   It shoudl only show if editing is possible. (blocker)
4) OK - item search 
   It could be improved later, so that if there is only "edit record" we show this option directly (no blocker).
5) NOT OK - Course reserves
   a) Use a barcode to add a reserve to a course from another branch, don't change home branch

   The edit link is removed, but something with the table structure is broken because of it and causes breakage of the datatable:
   Uncaught TypeError: Cannot set property '_DT_CellIndex' of undefined. (blocker)
   
   b) Use a barcode to add a reserve to a course from another branch, update home branch to an editable one
   The links are shown and the table keeps working.
   
   This one is tricky, I think for sure we need to fix the table to not be broken (minimum requirement).
   But this could be easily a thing where a patron 'traps' themselves with a reserve they can only 'remove' using the 'remove all' feature.
   
   Conclusion: An idea: As there sure is a use case for getting items from other branches for your course reserve, maybe we can do this:
   - Always show button to remove the item from the reserve (that's not editing right?) Also might fix the table issue.
   - Maybe: Allow editing of the item for this use case after the item has been added to the course reserve. If we allow on adding it... it would be consequential and it's only temporary changes.
6) OK - detail page - batch editing
7) NOT OK - tools - items batch edit   
   - Added barcodes of one editable and a non-editable item. Exlosion (blocker)
   Can't locate object method "params" via package "Koha::UI::Table::Builder::Items" at /kohadevbox/koha/Koha/UI/Table/Builder/Items.pm line 75
Comment 345 Kyle M Hall 2022-04-29 12:05:13 UTC
Created attachment 134375 [details] [review]
Bug 20256: (QA follow-up) hide Edit chooice in Actions on items editor if item cannot be edited
Comment 346 Kyle M Hall 2022-04-29 12:05:45 UTC
Created attachment 134376 [details] [review]
Bug 20256: (QA follow-up) Allow removal of course reserves for items that cannot be edited
Comment 347 Kyle M Hall 2022-04-29 12:05:53 UTC
Created attachment 134377 [details] [review]
Bug 20256: (QA follow-up) Fix explosion for items batch edit
Comment 348 Kyle M Hall 2022-04-29 12:31:14 UTC
> Summary:
> ==> The new edit_any_items overwrites the Indybranches pref. In consequence
> it appears it no longer has any effect. Correct?

IndependentBranches is built into this feature. If IndependentBranches is enabled, only a superlibrarian can edit all items, and non-superlibrarians can only edit items from his or her home library.

> 3) NOT OK - item edit page
>    The Edit link in the Actions menu always shows, but redirects to detail
> page, if no permission.
>    It shoudl only show if editing is possible. (blocker)

Fixed!

> 5) NOT OK - Course reserves
>    a) Use a barcode to add a reserve to a course from another branch, don't
> change home branch
> 
>    The edit link is removed, but something with the table structure is
> broken because of it and causes breakage of the datatable:
>    Uncaught TypeError: Cannot set property '_DT_CellIndex' of undefined.
> (blocker)

Fixed!

> 7) NOT OK - tools - items batch edit   
>    - Added barcodes of one editable and a non-editable item. Exlosion
> (blocker)
>    Can't locate object method "params" via package
> "Koha::UI::Table::Builder::Items" at
> /kohadevbox/koha/Koha/UI/Table/Builder/Items.pm line 75

Fixed!
Comment 349 Katrin Fischer 2022-04-29 12:36:50 UTC
(In reply to Kyle M Hall from comment #348)
> > Summary:
> > ==> The new edit_any_items overwrites the Indybranches pref. In consequence
> > it appears it no longer has any effect. Correct?
> 
> IndependentBranches is built into this feature. If IndependentBranches is
> enabled, only a superlibrarian can edit all items, and non-superlibrarians
> can only edit items from his or her home library.

I think that's not the case, I tried all the combinations.  It depends on the edit_any_items preference with this patch set. I was testing with a non-superlibrarian user:

"Test case 4:
* edit_items = yes
* edit_any_items = yes
* Independentbranches = YES
* No library groups defined

All items can be edited. Same as with Indybranches off."

Can you please test yourself and take a look at my summary?
Comment 350 Kyle M Hall 2022-04-29 13:54:56 UTC
> "Test case 4:
> * edit_items = yes
> * edit_any_items = yes
> * Independentbranches = YES
> * No library groups defined
> 
> All items can be edited. Same as with Indybranches off."
> 
> Can you please test yourself and take a look at my summary?

As far as I can tell, it's working as expected. Can you take a look at this video and let me know if I'm missing anything?

https://www.youtube.com/watch?v=kkwd-qCoM50

Thanks!
Comment 351 Katrin Fischer 2022-07-24 22:11:10 UTC
*** Bug 6423 has been marked as a duplicate of this bug. ***