Bug 16526

Summary: Insufficient permissions to delete users with category type set to staff
Product: Koha Reporter: Ray Delahunty <r.delahunty>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: RESOLVED WONTFIX QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: gmcharlt, katrin.fischer, kyle.m.hall
Version: Main   
Hardware: All   
OS: Linux   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Ray Delahunty 2016-05-16 10:32:51 UTC
We have set up a user category STAFF (name=Staff) which we use for staff members. We also have set up a user category LIBRARY (name=Library) which we use for administrative purposes. Users with category Library are assigned the category type of Staff.
When staff with Delete_Anonymize_Patrons permissions try to delete a user with a Library category they receive the error: "Unable to delete staff user- insufficient privileges", but when they change the user category to one with a Adult category type (for example), they can delete the user. Superlibrarian can delete the user regardless of user category type.
User category type issues preventing deletion have arisen before (bug 12834).
Comment 1 Katrin Fischer 2016-05-16 10:39:55 UTC
I think it's by design that you can't delete users of the staff category as they could fall easily into 'inactive' - only being used for working in Koha, but having no checkouts. 

An easy workaround here might be to set Library to be non-staff - how are you using this category? We usually only use staff for users with permissions to access the staff interface.
Comment 2 Ray Delahunty 2016-05-16 10:47:19 UTC
We brought over dozens of patrons used for issuing books "in transit" between our multiple sites, as we had problems with our former LMS workflows for in-transit functionality. We set them to be their own user category, and assigned the STAFF category code. (Am pretty sure we have a set of "Repairs" users with the category/category type being Library/Staff.). In post-migration clean-up we are deleting the old-LMS workaround patrons, and stumbled across this issue. Not a major drama as library staff can simply alter the category type and kill off the obsolete user.