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

--- Comment #163 from Andrew Fuerste-Henry <[email protected]> ---
Created attachment 208390
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208390&action=edit
Bug 42625: (QA follow-up) Require set_record_sources when staging with a
template

Staging MARC records applies the selected modification template's record
source to the import batch, and committing the batch then sets it on the
records. tools/stage-marc-import.pl listed every template and accepted
any template id, so a user with stage_marc_import but without
editcatalogue:set_record_sources could assign a record source, which
batch record modification already refuses.

This patch hides templates that set a record source from users without
the permission, and refuses a staging request that names one, as
batch_record_modification.pl does.

Test plan:
1. Create a MARC modification template and set a record source on it
2. As a staff user with tools permissions but without
   editcatalogue:set_record_sources, go to Cataloging > Stage records
   for import: the template is not listed
3. Run yarn cypress run --spec
t/cypress/integration/Tools/MarcModificationTemplateRecordSource_spec.ts
4. All tests pass, including the forged staging POST being refused

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