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.
Created attachment 22198 [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.
Created attachment 22252 [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: David Cook <dcook@prosentient.com.au> I was only able to open a patron record in circulation, but it works as described.
Created attachment 22254 [details] [review] [SIGN-OFF]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>
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>
Note: The "Change password" button (2 lines above) is contained in a test on the borrower permission. The test is done twice.
Pushed to master. Thanks, Owen!
This patch has been pushed to 3.12.x, will be in 3.12.8. Thanks Owen!