[Koha-bugs] [Bug 31791] Add the ability to lock records to prevent modification through the Koha staff interface(s)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 18 21:45:59 CET 2024


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

--- Comment #15 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
The submitted patches implement the requested feature, paired with the 'record
sources' feature.

Test plan:
1. Have bug 35919 applied
2. Apply this patchset
3. Create 2 'Record sources' in the Administration section

* Record source A having edition disabled
* Record source B having edition enabled

Take notes on the record source ID for each.

4. Create a valid staff member (known user and pass)
5. Have the user set the following permissions:
- catalogue (staff access)
- editcatalogue => all subpermissions bug `edit_locked_records`
6. Login with the user on a private/incognito browser
7. Pick a record and browse to it on the private browser
=> SUCCESS: You can edit it
8. Make the record source for the chosen record be A:
   $ koha-mysql kohadev
   > UPDATE biblio_metadata SET record_source_id=<A's ID> WHERE
biblionumber=<chosen record>;
9. Refresh the private window
=> SUCCESS: You are redirected to an error page
10. Search for the chosen record
11. Try to edit it
=> SUCCESS: The 'Edit record' link is greyed and cannot be used
=> SUCCESS: The greyed text has a tooltip explaining what's going on
12. Either change the record source to B, or just edit the record source A to
allow editing
13. Refresh the record detail page
=> SUCCESS: The 'Edit record' link is no longer greyed, and the record can be
edited
=> SUCCESS: Record edition is limited by source configuration
14. Verify superlibrarians can always edit such records

Note: the only way to set the record source for now is the API, which is
extensively tested on the provided tests (t/db_dependent/api/v1/biblios.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list