https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38291 --- Comment #79 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211238&action=edit Bug 38291: (QA follow-up) Require manage_libraries to list library groups GET /library_groups returns the full library group configuration, including the hide_patron_info, limit_item_editing and limit_report_access policy flags, and allows filtering on them. The staff interface page that exposes the same data (admin/library_groups.pl) requires the parameters => manage_libraries permission, but the endpoint only required catalogue. Align the endpoint with the admin page so a catalogue-only user cannot read (or probe via q) the group access control settings, and document the 403 response. Consumers that only need to know which groups are available for a given purpose should get a dedicated, narrower endpoint rather than this management representation. To test: 1. Apply the patches, then run yarn api:bundle and restart_all 2. Administration > Library groups: create a group, with one of the "Limit ... by group" settings checked 3. Create a staff user with only the catalogue permission, and another with only Parameters > Manage libraries (manage_libraries). Neither is a superlibrarian 4. Log in as the catalogue user and visit /api/v1/library_groups => SUCCESS: the response is a 403, "Authorization failure. Missing required permission(s)." 5. Log in as the user with manage_libraries and visit /api/v1/library_groups => SUCCESS: the list of library groups is shown 6. Log in as a superlibrarian and visit /api/v1/library_groups => SUCCESS: the list of library groups is shown 7. Run: prove t/db_dependent/api/v1/library_groups.t xt/api.t => SUCCESS: Tests pass Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.