https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42085 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 195495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195495&action=edit Bug 42085: Add Koha::Patron::set_permissions method This new method moves the permissions write logic out of the CGI controller and into Koha::Patron, making it testable and reusable. Behaviour: - Accepts a hashref of granted permissions only (matches the non-zero subset of permissions() return value) - Computes the borrowers.flags bitmask from the userflags table - Replaces user_permissions rows atomically inside a txn_do block - Applies a session-aware superlibrarian guard when ProtectSuperlibrarianPrivileges is enabled - Logs a MEMBERS/MODIFY action when permissions change and BorrowersLog is enabled, diffing before/after states Tests added to t/db_dependent/Koha/Patrons.t. -- You are receiving this mail because: You are watching all bug changes.