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)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 22 May 2018 10:27:12 +0000 (10:27 +0000)
commit7ecc1257865d47336071412bf65b321090b69ce4
treea83d41dfdf5c6066c099533456dd14bd34568278
parent07cc384cdaa5b191a55fe2fe300705d20a908a72
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