Bug 30418: Add ability for permitted staff to edit list contents
authorAlex Buckley <alexbuckley@catalyst.net.nz>
Fri, 19 Aug 2022 03:17:47 +0000 (03:17 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 15 May 2023 21:23:57 +0000 (18:23 -0300)
commit008ed48d66d9e33ac0c1fd17a859cfa1d130da8b
tree6369bf7a5bbb723bcb46d30e626bd13bfddb1eff
parentfe1f6464cce0fb13cc681d4468fb537bbfbc8f29
Bug 30418: Add ability for permitted staff to edit list contents

Public lists with 'Allow changes to contents from' = 'Permitted staff only'
can have their contents managed by Koha patrons with either of the
permissions below:

- superlibrarian permission
- catalogue permission + 'edit_public_list_contents' sub-permission

Test plan:
1. Apply patches, update database, restart services
2. In the staff client go to: Lists > New List
3. Create a list, choose 'Allow changes to contents from' => 'Permitted
staff only'

4. Log into the OPAC as a patron with no permissions.
5. Confirm you CANNOT add a biblio to the list from the OPAC search result page and
OPAC biblio detail pages

6. Log into the OPAC as a patron with only the 'catalogue' permissions
enabled
7. Confirm you CANNOT add a biblio to the list from OPAC search result
or biblio detail pages

8. Log into the OPAC as a patron with the 'catalogue' and
'edit_public_list_contents' permissions enabled
9. Confirm you CAN add/remove biblios from the OPAC search result and
biblio detail pages

10. Log into the OPAC as a patron with superlibrarian permissions
11. Confirm you CAN add a biblio to the list from the OPAC search result
page and OPAC biblio detail pages

12. Log into the staff client as a patron with only the
'catalogue' permission and confirm you CANNOT add/remove records from the
list

13. Log into the staff client as a patron with the 'catalogue' and
'edit_public_list_contents' sub-permission (found under 'Lists' parent
permission)
14. Confirm you CAN add/remove records from the list

15. Login into thestaff client as a patron with 'superlibrarian'
permissions and confirm you CAN add/remove records from the list

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Patron.pm
Koha/Virtualshelf.pm
Koha/Virtualshelves.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
opac/opac-addbybiblionumber.pl
opac/opac-shelves.pl
virtualshelves/shelves.pl