Summary: | Patron picture uploader ignores patronimages syspref | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Tools | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | trivial | ||
Priority: | P5 - low | CC: | 1joynelson, indradg, josef.moravec, lucas, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.05.00,19.11.06, 19.05.11
|
|
Circulation function: | |||
Bug Depends on: | 8387 | ||
Bug Blocks: | |||
Attachments: |
Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off
Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off |
Description
Jared Camins-Esakov
2013-01-18 02:36:45 UTC
Created attachment 84946 [details] [review] Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off In addition to checking the patron image upload permission, this adds a check for the patronimages system preference to the tools home page and sidebar. To test: - Check that the patron image upload tool only displays when - system preference patronimages is set to 'Allow' and user is either - superlibrarian or - has bath_upload_patron_images permission - Save URL of patron image uploader page - Turn off patronimages - Verify you get redirected to the home page of Koha when trying to access the page Note: this redirect is already used by the stock rotation feature. Created attachment 85021 [details] [review] Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off In addition to checking the patron image upload permission, this adds a check for the patronimages system preference to the tools home page and sidebar. To test: - Check that the patron image upload tool only displays when - system preference patronimages is set to 'Allow' and user is either - superlibrarian or - has bath_upload_patron_images permission - Save URL of patron image uploader page - Turn off patronimages - Verify you get redirected to the home page of Koha when trying to access the page Note: this redirect is already used by the stock rotation feature. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Seems sound, works for me. Signing off Wouldn't be better to display warning on top of patron image upload page? I was looking for an example for that. I will have another look. Maybe just push a variable to the template and wrap it all in if-else? ... or just use the TT plugin. I will try it out. Created attachment 102039 [details] [review] Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref is off In addition to checking the patron image upload permission, this adds a check for the patronimages system preference to the tools home page and sidebar. To test: - Check that the patron image upload tool only displays when - system preference patronimages is set to 'Allow' and user is either - superlibrarian or - has bath_upload_patron_images permission - Save URL of patron image uploader page - Turn off patronimages - Verify you get redirected to the home page of Koha when trying to access the page Note: this redirect is already used by the stock rotation feature. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> I'd like to throw the rebased patch out there - I didn't find an example for a page with a message in staff. Stock rotation for example behaves the same as this patch. This one has languished long enough, I think it's a reasonable patch and trivial code.. upgrading my earlier signoff to a PQA Nice work everyone! Pushed to master for 20.05 Backported to 19.11.x branch for 19.11.06 backported to 19.05.x for 19.05.11 |