If you don't have permission to upload images, you still see the add/edit button for the patron image. It does nothing when clicked, but it really shouldn't be visible at all.
Created attachment 147420 [details] [review] Bug 32976: Add permission check on Add/Edit controls for patron images This adds a check on the batch_upload_patron_images permission to the Add/Edit control for patron images in the patron account in the staff interface. To test: * Enable patronimages system preference * With your 'superlibrarian' account: * Add and edit/remove a patron image to an account * Create a staff user with batch_upload_patron_images permission * Log in with this user and verify everything works the same as before * Remove the batch_upload_patron_images permission * Verify the Add/Edit controls are on longer visible to this patron
Created attachment 147446 [details] [review] Bug 32976: Add permission check on Add/Edit controls for patron images This adds a check on the batch_upload_patron_images permission to the Add/Edit control for patron images in the patron account in the staff interface. To test: * Enable patronimages system preference * With your 'superlibrarian' account: * Add and edit/remove a patron image to an account * Create a staff user with batch_upload_patron_images permission * Log in with this user and verify everything works the same as before * Remove the batch_upload_patron_images permission * Verify the Add/Edit controls are on longer visible to this patron Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 147462 [details] [review] Bug 32976: Add permission check on Add/Edit controls for patron images This adds a check on the batch_upload_patron_images permission to the Add/Edit control for patron images in the patron account in the staff interface. To test: * Enable patronimages system preference * With your 'superlibrarian' account: * Add and edit/remove a patron image to an account * Create a staff user with batch_upload_patron_images permission * Log in with this user and verify everything works the same as before * Remove the batch_upload_patron_images permission * Verify the Add/Edit controls are on longer visible to this patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Thx Owen and Christopher!
Created attachment 148638 [details] [review] Bug 32976: Add permission check on Add/Edit controls for patron images This adds a check on the batch_upload_patron_images permission to the Add/Edit control for patron images in the patron account in the staff interface. To test: * Enable patronimages system preference * With your 'superlibrarian' account: * Add and edit/remove a patron image to an account * Create a staff user with batch_upload_patron_images permission * Log in with this user and verify everything works the same as before * Remove the batch_upload_patron_images permission * Verify the Add/Edit controls are on longer visible to this patron Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.