[Bug 38050] New: Add REST endpoints for working with "lists"/"virtual shelves"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Bug ID: 38050 Summary: Add REST endpoints for working with "lists"/"virtual shelves" Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com We don't yet expose the lists functionality over API's, this would be a beneficial enhancement both for internal use and thrid party integrations wishing to integrate with this functionality. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20172 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20172 [Bug 20172] Use the REST API to display contents of lists in the staff interface -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28965 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|martin.renvoize@ptfs-europe |jacob.omara@ptfs-europe.com |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28965 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28965 [Bug 28965] Add public routes for lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #1 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 174807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174807&action=edit Bug 38050: create admin CRUD endpoint definitions this patch adds api endpoints for lists/virtualshelves. Tests to follow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #2 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 174808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174808&action=edit Bug 38050: create methods for admin CRUD list endpoints This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #3 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 174809 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174809&action=edit Bug 38050: create public CRUD list endpoint definitions This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #4 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 174810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174810&action=edit Bug 38050: create methods for public CRUD list endpoints This patch creates the methods for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jacob.omara@ptfs-europe.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- You're going to need to add unit tests for all these for QA Jacob. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Bug 38050 depends on bug 28965, which changed state. Bug 28965 Summary: Add public routes for lists https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28965 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174807|0 |1 is obsolete| | --- Comment #6 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 176462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176462&action=edit Bug 38050: create admin CRUD endpoint definitions This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174808|0 |1 is obsolete| | --- Comment #7 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 176463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176463&action=edit Bug 38050: create methods for admin CRUD list endpoints This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174809|0 |1 is obsolete| | --- Comment #8 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 176464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176464&action=edit Bug 38050: create public CRUD list endpoint definitions This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174810|0 |1 is obsolete| | --- Comment #9 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 176465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176465&action=edit Bug 38050: create methods for public CRUD list endpoints This patch creates the methods for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #10 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 176466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176466&action=edit Bug 38050: create tests for admin CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #11 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Created attachment 176467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176467&action=edit Bug 38050: create tests for public CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #12 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- This patch adds API endpoints for lists, both public and admin. To Test: prove /t/db_dependent/api/v1/lists.t prove /t/db_dependent/api/v1/public/lists.t These currently respect "allow_changes_from_others" and "allow_changes_from_staff" as to whether you can modify a given list with the admin endpoints. The public endpoints can only modify lists owned by the authenticated user. As a consequence, to allow you to be able to always edit any lists you create with the admin endpoints (even with another user as the owner) unless changed, any created lists will be created with "allow_changes_from_staff=1" Additionally, passing ->filter_by_readable also means that private lists are not displayed, even with the admin endpoints. Is this intended functionality here or should the admin endpoints (which require administer lists permissions) allow you to edit/view all lists regardless? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176462|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176769 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176769&action=edit Bug 38050: create admin CRUD endpoint definitions This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176463|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176770&action=edit Bug 38050: create methods for admin CRUD list endpoints This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176464|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176771 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176771&action=edit Bug 38050: create public CRUD list endpoint definitions This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176465|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176772 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176772&action=edit Bug 38050: create methods for public CRUD list endpoints This patch creates the methods for the public CRUD enpoints for lists/virtualshelves Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176466|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176773 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176773&action=edit Bug 38050: create tests for admin CRUD list endpoints Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176467|0 |1 is obsolete| | --- Comment #18 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 176774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176774&action=edit Bug 38050: create tests for public CRUD list endpoints Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Status|Signed Off |Failed QA --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Test failures * Proving /usr/share/koha/t/db_dependent/api/v1/lists.t KO! # Failed test 'Anonymous users cannot access admin lists endpoint' # at /usr/share/koha/t/db_dependent/api/v1/lists.t line 62. # got: '404' # expected: '401' # Failed test 'Regular patrons cannot access admin lists endpoint' # at /usr/share/koha/t/db_dependent/api/v1/lists.t line 64. # got: '404' # expected: '403' # Failed test '200 OK' # at /usr/share/koha/t/db_dependent/api/v1/lists.t line 70. # got: '404' # expected: '200' # Failed test 'exact match for JSON Pointer ""' # at /usr/share/koha/t/db_dependent/api/v1/lists.t line 70. # Structures begin differing at: # $got = HASH(0x55dda459a920) # $expected = ARRAY(0x55dda43fba30) # Looks like you failed 4 tests of 7. etc etc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jacob O'Mara from comment #12)
Additionally, passing ->filter_by_readable also means that private lists are not displayed, even with the admin endpoints. Is this intended functionality here or should the admin endpoints (which require administer lists permissions) allow you to edit/view all lists regardless?
Probably not. But that is a long debate ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Hackfest -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176769|0 |1 is obsolete| | --- Comment #21 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180788&action=edit Bug 38050: create admin CRUD endpoint definitions This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176770|0 |1 is obsolete| | --- Comment #22 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180789 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180789&action=edit Bug 38050: create methods for admin CRUD list endpoints This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176771|0 |1 is obsolete| | --- Comment #23 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180790 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180790&action=edit Bug 38050: create public CRUD list endpoint definitions This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176772|0 |1 is obsolete| | --- Comment #24 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180791 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180791&action=edit Bug 38050: create methods for public CRUD list endpoints This patch creates the methods for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176773|0 |1 is obsolete| | --- Comment #25 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180792 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180792&action=edit Bug 38050: create tests for admin CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176774|0 |1 is obsolete| | --- Comment #26 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180793&action=edit Bug 38050: create tests for public CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180788|0 |1 is obsolete| | --- Comment #27 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180838 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180838&action=edit Bug 38050: create admin CRUD endpoint definitions The delete endpoint tests were intermittently failing but this is now resolved. This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists Current status: Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180789|0 |1 is obsolete| | --- Comment #28 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180839&action=edit Bug 38050: create methods for admin CRUD list endpoints This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180790|0 |1 is obsolete| | --- Comment #29 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180840 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180840&action=edit Bug 38050: create public CRUD list endpoint definitions This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180791|0 |1 is obsolete| | --- Comment #30 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180841 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180841&action=edit Bug 38050: create methods for public CRUD list endpoints This patch creates the methods for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180792|0 |1 is obsolete| | --- Comment #31 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180842 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180842&action=edit Bug 38050: create tests for admin CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180793|0 |1 is obsolete| | --- Comment #32 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180843 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180843&action=edit Bug 38050: create tests for public CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180838|0 |1 is obsolete| | --- Comment #33 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180879&action=edit Bug 38050: create admin CRUD endpoint definitions This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180839|0 |1 is obsolete| | --- Comment #34 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180880&action=edit Bug 38050: create methods for admin CRUD list endpoints This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180840|0 |1 is obsolete| | --- Comment #35 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180881 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180881&action=edit Bug 38050: create public CRUD list endpoint definitions This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180841|0 |1 is obsolete| | --- Comment #36 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180882&action=edit Bug 38050: create methods for public CRUD list endpoints This patch creates the methods for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180842|0 |1 is obsolete| | --- Comment #37 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180883 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180883&action=edit Bug 38050: create tests for admin CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180843|0 |1 is obsolete| | --- Comment #38 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 180884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180884&action=edit Bug 38050: create tests for public CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #39 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Let's not talk about the fact that I re-attached this again. That's what happens when you forget to re-run the qa script before attaching changes. Let me be a lesson for others. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Mathieu Saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathsabypro@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #40 from David Cook <dcook@prosentient.com.au> --- (In reply to Martin Renvoize (ashimema) from comment #0)
We don't yet expose the lists functionality over API's, this would be a beneficial enhancement both for internal use and thrid party integrations wishing to integrate with this functionality.
I would love this -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@gmail.com --- Comment #41 from Jonathan Druart <jonathan.druart@gmail.com> --- description: "This resource returns a list of existing bibliographic lists." - summary: List bibliographic lists + x-koha-authorization: + permissions: + tools: manage_patron_lists This is the wrong "list" module. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #42 from Jonathan Druart <jonathan.druart@gmail.com> --- QA comment: 1. See previous comment re the permission 2. 2 occurrences of Data::Dumper left in the patches 3. Why isn't Koha::REST::V1::List::update using $shelf->can_be_managed to know if the logged in user can edit the list? 4. What about the other logic in virtualshelves/shelves.pl? 126 $sortfield = 'title' 127 unless grep { $_ eq $sortfield } qw( title author copyrightdate publicationyear itemcallnumber dateadded ); 128 if ( $sortfield eq 'copyrightdate' and C4::Context->preference('marcflavour') eq 'UNIMARC' ) { 129 $sortfield = 'publicationyear'; 130 } Shouldn't it be port to the REST API endpoint as well? 5. Same as 3 for deletion: why isn't the logic the same as the shelves.pl controller? + if ( $list->can_be_deleted( $user->id ) + || $list->allow_change_from_staff + || $list->allow_change_from_others + || ( $list->is_public && C4::Auth::haspermission( $user->userid, { lists => 'delete_public_lists' } ) ) ) vs 158 if ($shelf) { 159 if ( $shelf->can_be_deleted($loggedinuser) ) { 160 eval { $shelf->delete; }; I don't want to know which one is correct, but I expect to see the exact same code in both places. 6. What if the pref `virtualshelves` is off? 7. QA script is failing: [FAIL] t/db_dependent/api/v1/lists.t FAIL test_no_warnings 'use Test::NoWarnings' must be present in this test file. [FAIL] t/db_dependent/api/v1/public/lists.t FAIL file_permissions File must have the exec flag -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180879|0 |1 is obsolete| | --- Comment #43 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189219 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189219&action=edit Bug 38050: create admin CRUD endpoint definitions This patch creates the yaml definitions for the CRUD enpoints for virtualshelves/lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180880|0 |1 is obsolete| | --- Comment #44 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189220 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189220&action=edit Bug 38050: create methods for admin CRUD list endpoints This patch implements the methods for the admin CRUD endpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180881|0 |1 is obsolete| | --- Comment #45 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189221 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189221&action=edit Bug 38050: create public CRUD list endpoint definitions This patch creates the yaml definitions for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180882|0 |1 is obsolete| | --- Comment #46 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189222 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189222&action=edit Bug 38050: create methods for public CRUD list endpoints This patch creates the methods for the public CRUD enpoints for lists/virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180883|0 |1 is obsolete| | --- Comment #47 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189223 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189223&action=edit Bug 38050: create tests for admin CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180884|0 |1 is obsolete| | --- Comment #48 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189224&action=edit Bug 38050: create tests for public CRUD list endpoints -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #49 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 189225 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189225&action=edit Bug 38050: move sortfield validation to method for reuse Call method instead of repeating the validation logic -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #50 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks for the above! This latest patchset should address all of the above with one notable exception. All of the logic is now consistently uses the can_be_x checks and the sortfield logic is also integrated. My understanding of the allow_change_x columns was flawed as these seem to be for the add/removal of items from lists. Not typically lists themselves so those have been removed from this logic, list items endpoints will need to integrate with these though. The notable exception: There is no handling for if the virtualshelves pref is disabled, though this is currently consistent with other api’s. I couldn’t find any instances where we DO handle that. For instance the ERM api’s seem to all still work while it’s disabled and I couldn’t find any logic that should stop them from doing so. While I could technically add a syspref check at the top of all of the api methods, I think we would be better suited handling this at the router/swagger level. I can add a bug to that effect if you agree? Or, if I’m wrong, if you could point me at an example of endpoints that handle this, I would be happy to follow up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #51 from David Cook <dcook@prosentient.com.au> --- (In reply to Jacob O'Mara from comment #50)
There is no handling for if the virtualshelves pref is disabled, though this is currently consistent with other api’s. I couldn’t find any instances where we DO handle that. For instance the ERM api’s seem to all still work while it’s disabled and I couldn’t find any logic that should stop them from doing so. While I could technically add a syspref check at the top of all of the api methods, I think we would be better suited handling this at the router/swagger level. I can add a bug to that effect if you agree? Or, if I’m wrong, if you could point me at an example of endpoints that handle this, I would be happy to follow up.
That's really interesting. I was working on an API endpoint recently and ran into that exact issue. It would be good to have a systematic approach to this. I think that if the feature is disabled then the API endpoints should be disabled too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #52 from Jonathan Druart <jonathan.druart@gmail.com> --- That's definitely a bug in the existing endpoints! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38050 --- Comment #53 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- FYI: Bug 43030 adds a generic own-resource (self-access) authorization mechanism to the REST API -- Koha::Object->is_owned_by / Koha::Objects->owned_by, plus an allow-owner flag on x-koha-authorization, so an authenticated caller without the module permission can still access/manage records they own. This bug's admin CRUD endpoints for lists/virtualshelves currently do their own ownership/sharing checks by calling Koha::Virtualshelf's can_be_viewed / can_be_managed / can_be_deleted directly in the controllers (see comment 42, point 3). That's richer than plain ownership -- it also covers sharing and the delete_public_lists permission, which the generic framework in Bug 43030 doesn't attempt to model. Once both bugs have landed, it would be worth a follow-up bug evaluating whether the plain-ownership case here could be expressed via is_owned_by/allow-owner, while keeping can_be_viewed/can_be_managed for the sharing and public-list-permission logic. Not asking to change anything on this bug for that now, just flagging the relationship for whoever picks up the follow-up. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org