Summary: | Upload local cover image permission implementation error | ||
---|---|---|---|
Product: | Koha | Reporter: | André Melancia <Andy> |
Component: | Tools | Assignee: | Fridolin Somers <fridolin.somers> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | major | ||
Priority: | P5 - low | CC: | Andy, chris, gmcharlt, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Proposed patch
Bug 9065 - set correct permission for upload local cover image Bug 9065 - set correct permission for upload local cover image |
Description
André Melancia
2012-11-13 02:28:34 UTC
Created attachment 14486 [details] [review] Proposed patch You are right André, the permission is not correct in upload_cover_image.pl. Created attachment 14501 [details] [review] 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> Note that I reworded the commit message for clarity and added a test plan. Thanks a lot Galen Created attachment 14520 [details] [review] 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. This patch has been pushed to master. Pushed to 3.8.x and 3.10.x, will be in 3.8.9 and 3.10.2 |