https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42625

--- Comment #164 from Andrew Fuerste-Henry <[email protected]> ---
Created attachment 208391
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208391&action=edit
Bug 42625: (QA follow-up) Require set_record_sources in svc/import_bib

svc/import_bib only requires editcatalogue:edit_catalogue, but it accepts
a marc_modification_template_id and stamps that template's record source
on the webservice batch and the records committed from it. Any cataloguer
could therefore assign a record source through the webservice, bypassing
the set_record_sources permission that batch record modification and
staging enforce.

This patch refuses the request with status 'failed' and error
'set_record_source_not_allowed' when the template sets a record source
and the authenticated user lacks set_record_sources. Templates without a
record source keep working as before.

Test plan:
1. Run yarn cypress run --spec
t/cypress/integration/Tools/MarcModificationTemplateRecordSource_spec.ts
2. All tests pass: a superlibrarian posting to svc/import_bib with a
   template that sets a record source gets status 'ok', and a user with
   only edit_catalogue gets status 'failed' with error
   'set_record_source_not_allowed'

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Andrew Fuerste Henry <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to