Summary: | Incorrect library check in patron message deletion logic | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Circulation | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, david, fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29903 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28724 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29905 |
||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes the logic controlling whether a patron message on the circulation or patron details page has a "Delete" link. An error in the logic prevented messages from being removed by staff who should have been authorized to do so.
|
|
Version(s) released in: |
22.05.00,21.11.03
|
Circulation function: | |
Bug Depends on: | 21757 | ||
Bug Blocks: | |||
Attachments: |
Bug 29889: Incorrect library check in patron message deletion logic
Bug 29889: Incorrect library check in patron message deletion logic |
Description
Owen Leonard
2022-01-14 19:33:31 UTC
Created attachment 129514 [details] [review] Bug 29889: Incorrect library check in patron message deletion logic This patch corrects the logic controlling whether a patron message on the circulation or patron details page has a "Delete" link. An error in the logic prevented messages from being removed by staff who should have been authorized to do so. To reproduce the bug, check that your AllowAllMessageDeletion preference is disabled. - In the staff client, check out to a patron whose home library doesn't match the library you're logged in at. - Add a message to the patron's account. - You should see no "Delete" link next to the newly-added message. - If you edit the patron so that their home library matches the library you're logged in at the delete link will appear. To test, apply the patch and follow the steps above. The delete link should aways appear if the message was left by someone logged in at the same library. Created attachment 129592 [details] [review] Bug 29889: Incorrect library check in patron message deletion logic This patch corrects the logic controlling whether a patron message on the circulation or patron details page has a "Delete" link. An error in the logic prevented messages from being removed by staff who should have been authorized to do so. To reproduce the bug, check that your AllowAllMessageDeletion preference is disabled. - In the staff client, check out to a patron whose home library doesn't match the library you're logged in at. - Add a message to the patron's account. - You should see no "Delete" link next to the newly-added message. - If you edit the patron so that their home library matches the library you're logged in at the delete link will appear. To test, apply the patch and follow the steps above. The delete link should aways appear if the message was left by someone logged in at the same library. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Trivial, skipping QA. I'm about to push master I was puzzled by test plan until I understood it is without patch, then with patch :) BTW : We may allow superlibrarian to delete any message even when system preference is disabled. Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.03 Missing dependency, not backported to 21.05 |