]> git.koha-community.org Git - koha.git/commit
Bug 9422: Don't allow access to 'Upload patron images' when patronimages syspref...
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 10 Feb 2019 11:09:08 +0000 (12:09 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 3 Apr 2020 13:26:32 +0000 (14:26 +0100)
commit563784bcf5afc2989d354dcf2e91cf3fa667e67d
tree9ffa5cfb3185735dec5fa8c815db11bcb6507a95
parent2823fee5cfb08cec398e9d02cfc9e1d65b8fde57
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>
koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt
tools/picture-upload.pl