]> git.koha-community.org Git - koha.git/commit
Bug 9065 - set correct permission for upload local cover image
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Wed, 9 Jan 2013 09:40:24 +0000 (10:40 +0100)
committerChris Cormack <chris@bigballofwax.co.nz>
Tue, 15 Jan 2013 04:28:34 +0000 (17:28 +1300)
commit592b8c333611b6d3348d4900d1a2c73f0f4a8c1c
treeaf03ab4269ce0ee7d6d74ce9c2d992a0b5418109
parente57c3c8bcb3d030cd8f7ca2b84800241e5d58123
Bug 9065 - set correct permission for upload local cover image

This patch fixes a problem where if a staff user has the
upload_local_cover_images permission (and is not a superlibrarian
and does not have all of the tools permissions), trying to use the
"Tools -> Upload local cover image" will fail with "You do not have
permissions [...]".

To test after applying the patch:

- Create a staff uesr that has just the catalogue and
  upload_local_cover_images permission.
- Log in as that staff user.
- Go to "Tools -> Upload local cover image".
- Verify that one is given the form to upload a cover image.
- Without the patch, one will be presented with the login
  form instead.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
mysql> select * from permissions where code="upload_cover_images";
Empty set (0.00 sec)

mysql> select * from permissions where code="upload_local_cover_images";
+------------+---------------------------+---------------------------+
| module_bit | code                      | description               |
+------------+---------------------------+---------------------------+
|         13 | upload_local_cover_images | Upload local cover images |
+------------+---------------------------+---------------------------+
1 row in set (0.00 sec)

"git grep upload_cover_images" returns 0 result.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
tools/upload-cover-image.pl