Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission
Summary: Hide duplicate patron button if logged in user lacks CAN_user_borrowers permi...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-21 21:35 UTC by Owen Leonard
Modified: 2015-06-04 23:24 UTC (History)
5 users (show)

See Also:
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 (2.03 KB, patch)
2013-10-21 21:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission (2.13 KB, patch)
2013-10-22 00:27 UTC, David Cook
Details | Diff | Splinter Review
[SIGN-OFF]Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission (2.05 KB, patch)
2013-10-22 00:34 UTC, Ed Veal
Details | Diff | Splinter Review
Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission (2.11 KB, patch)
2013-10-22 07:23 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!