Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 4 May 2018 06:10:46 +0000 (08:10 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 7 May 2018 14:55:13 +0000 (11:55 -0300)
commitf0b88ed328e83877cbb98c5e3904e6b087b5a9ca
treeb42387ce2101a55d1dc93f0e7d7e5ccbe86e2030
parent90d249b39dcc6702074aea7b747807d231d09024
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>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
opac/opac-shareshelf.pl