Bug 11097

Summary: Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook, eveal, gmcharlt, jonathan.druart, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission
Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission
[SIGN-OFF]Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission
Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission

Description Owen Leonard 2013-10-21 21:35:00 UTC
The "duplicate patron" button is shown on in the patron toolbar (on circ and patrons pages) even for users who lack permission to edit patrons. The display of this button should be conditional on the logged in user having permission.
Comment 1 Owen Leonard 2013-10-21 21:58:29 UTC Comment hidden (obsolete)
Comment 2 David Cook 2013-10-22 00:27:43 UTC Comment hidden (obsolete)
Comment 3 Ed Veal 2013-10-22 00:34:19 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-10-22 07:23:09 UTC
Created attachment 22261 [details] [review]
Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission

The "duplicate" button on the circ/patron toolbar should not appear if
the logged in user lacks permission to edit patron records. This patch
wraps the button in the required logic.

To test, open a patron record in circulation or patrons and view as a
staff client user who both has and doesn't have CAN_user_borrowers
permission. The button should be shown and not shown accordingly.

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jonathan Druart 2013-10-22 07:24:51 UTC
Note:
The "Change password" button (2 lines above) is contained in a test on the borrower permission. The test is done twice.
Comment 6 Galen Charlton 2013-10-22 12:49:03 UTC
Pushed to master.  Thanks, Owen!
Comment 7 Tomás Cohen Arazi 2013-12-05 15:19:43 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.

Thanks Owen!