Summary: | Multiple invitations to share lists prevents some users from accepting | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Lists | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11943 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 9032, 14544 | ||
Bug Blocks: | |||
Attachments: |
Bug 20687 - Check all share keys for a given list
Bug 20687: Check all share keys for a given list Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes Bug 20687: Check all share keys for a given list Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes |
Description
Nick Clemens (kidclamp)
2018-05-01 11:19:05 UTC
Created attachment 74949 [details] [review] Bug 20687 - Check all share keys for a given list This patch gets all the shares for a list and iterates through to find the correct one when accepting from a link To test: 1 - Create a private list in the opac 2 - Invite 2 patrons to the list 3 - Try to accept from the patron you first shared to 4 - You will get a failure message about expiration of the link 5 - Apply patch 6 - Now try to accept the first share 7 - It works! Success! Just reading the code: should not we search using the invitekey? There is definitely something wrong. Marcel maybe? (In reply to Jonathan Druart from comment #2) > Just reading the code: should not we search using the invitekey? > There is definitely something wrong. Marcel maybe? I wrote the original code, but the author of bug 14544 made some changes :) Working on this one now Nick: Commit title does not start with 'Bug XXXXX: ' - d63a082 !! Created attachment 75047 [details] [review] Bug 20687: Check all share keys for a given list This patch gets all the shares for a list and iterates through to find the correct one when accepting from a link To test: 1 - Create a private list in the opac 2 - Invite 2 patrons to the list 3 - Try to accept from the patron you first shared to 4 - You will get a failure message about expiration of the link 5 - Apply patch 6 - Now try to accept the first share 7 - It works! Success! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 75048 [details] [review] Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes We should check the invitekey in show_accept by passing it along in the search call. On the way I fixed some error checking: if the list number is invalid, or the list is public or you are the owner, or if the key is not found, we should set the right error code; the template contains those messages. Test plan: [1] Share a list and accept a correct invitation with another user. [2] Try to accept some invalid proposals: wrong key, wrong list. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested invalid key, wrong list, owner, public list, expiry. Left only one (known) problem: double accepts (bug 11943). Will try to add something there ;) Created attachment 75124 [details] [review] Bug 20687: Check all share keys for a given list This patch gets all the shares for a list and iterates through to find the correct one when accepting from a link To test: 1 - Create a private list in the opac 2 - Invite 2 patrons to the list 3 - Try to accept from the patron you first shared to 4 - You will get a failure message about expiration of the link 5 - Apply patch 6 - Now try to accept the first share 7 - It works! Success! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 75125 [details] [review] Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes We should check the invitekey in show_accept by passing it along in the search call. On the way I fixed some error checking: if the list number is invalid, or the list is public or you are the owner, or if the key is not found, we should set the right error code; the template contains those messages. Test plan: [1] Share a list and accept a correct invitation with another user. [2] Try to accept some invalid proposals: wrong key, wrong list. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested invalid key, wrong list, owner, public list, expiry. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 18.05, thanks to everybody involved! Pushed to stable for 17.11.6 Pushed to 17.05.x for v17.05.12 |