Bug 39650

Summary: Updating the protected flag is not possible when creating a new patron
Product: Koha Reporter: Marion Durand <marion.durand>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26170
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36085
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marion Durand 2025-04-16 08:26:24 UTC
When creating a new patron, it is not possible to update the protected flag even when logged in as a superlibrarian.
It is still possible to update this flag when updating an existing patron.


This seams liked to bug 36085. The check to set the authorization flag CanUpdateProtectPatron (witch restrict the update to only superlibrarian) is itself in a check for op 'edit_form', 'cud-save' or 'duplicate'. 
The flag CanUpdateProtectPatron is not passed to the template when creating a new user as the op is 'add_form' even when logged in as a superlibrarian.