[Bug 41946] New: Superlibrarian should be able to set protected status on patron creation
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 Bug ID: 41946 Summary: Superlibrarian should be able to set protected status on patron creation Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Since bug 36085, the protected flag in a patron account was removed from the patron creation form, regardless of if the user is a superlibrarian. 1. With a superlibrarian account, go to Patrons > New patron > Choose any category --> Before bug 36085 : In "Library management" section, there is a Protected yes/no field --> After bug 36085 : the Protected option is no longer there. If I create a SIP account, I now have to create the account, then go back an edit it to add the protection. Non-superlibrarians should still not be able to set the flag on creation. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36085 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36085 [Bug 36085] Setting and unsetting the protected flag should be limited to superlibrarian accounts -- 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=41946 --- Comment #1 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 194019 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194019&action=edit Bug 41946: Allow superlibrarians to set protected flag on patron creation Since bug 36085, the protected flag in a patron account was removed from the patron creation form, regardless of if the user is a superlibrarian. - Hoist $logged_in_user lookup before the edit_form block - Move superlibrarian capability checks after the block so they apply to all operations including patron creation To test: 1. Sign in as a superlibrarian 2. Go to Patrons > New patron > choose any category 3. Without this patch: the "Protected" yes/no field is missing from the "Library management" section 4. Apply this patch 5. Repeat step 2 - The "Protected" yes/no field is now visible 6. Create the patron with Protected set to "Yes" 7. Confirm the patron is saved as protected 8. Sign in as a non-superlibrarian with edit_borrowers permission 9. Repeat step 2 - The "Protected" field should still be hidden 10. Edit an existing patron as superlibrarian - The "Protected" field is visible and functional 11. Edit an existing patron as non-superlibrarian - The "Protected" field is hidden 12. Sign off -- 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=41946 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de Status|NEW |Needs Signoff -- 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=41946 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=41946 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194019|0 |1 is obsolete| | --- Comment #2 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 194025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194025&action=edit Bug 41946: Allow superlibrarians to set protected flag on patron creation Since bug 36085, the protected flag in a patron account was removed from the patron creation form, regardless of if the user is a superlibrarian. - Hoist $logged_in_user lookup before the edit_form block - Move superlibrarian capability checks after the block so they apply to all operations including patron creation To test: 1. Sign in as a superlibrarian 2. Go to Patrons > New patron > choose any category 3. Without this patch: the "Protected" yes/no field is missing from the "Library management" section 4. Apply this patch (+ restart_all) 5. Repeat step 2 - The "Protected" yes/no field is now visible 6. Create the patron with Protected set to "Yes" 7. Confirm the patron is saved as protected 8. Sign in as a non-superlibrarian with edit_borrowers permission 9. Repeat step 2 - The "Protected" field should still be hidden 10. Edit an existing patron as superlibrarian - The "Protected" field is visible and functional 11. Edit an existing patron as non-superlibrarian - The "Protected" field is hidden 12. Sign off Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 --- Comment #3 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I had to restart_all after applying the patch. I've amended the test plan. After the patch Superlibrarian is able to set the protected flag on creation and on edition Non-superlibrarian is never able to set the protected flag (creation or edition) Thanks for the speedy patch Paul! The original patch was added to 24.11. If this one could be backported all the way it would be great. Thanks! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please fill Assignee -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |me@paulderscheid.xyz |ity.org | CC| |lucas@bywatersolutions.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=41946 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194025|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 201066 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201066&action=edit Bug 41946: Allow superlibrarians to set protected flag on patron creation Since bug 36085, the protected flag in a patron account was removed from the patron creation form, regardless of if the user is a superlibrarian. - Hoist $logged_in_user lookup before the edit_form block - Move superlibrarian capability checks after the block so they apply to all operations including patron creation To test: 1. Sign in as a superlibrarian 2. Go to Patrons > New patron > choose any category 3. Without this patch: the "Protected" yes/no field is missing from the "Library management" section 4. Apply this patch 5. Repeat step 2 - The "Protected" yes/no field is now visible 6. Create the patron with Protected set to "Yes" 7. Confirm the patron is saved as protected 8. Sign in as a non-superlibrarian with edit_borrowers permission 9. Repeat step 2 - The "Protected" field should still be hidden 10. Edit an existing patron as superlibrarian - The "Protected" field is visible and functional 11. Edit an existing patron as non-superlibrarian - The "Protected" field is hidden 12. Sign off Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Not enforce at the REST API level. Opened bug 42927. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41946 --- Comment #7 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org