Bug 29957: Let check_api_auth return created cookie
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 17 Mar 2022 09:21:46 +0000 (09:21 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 12 Apr 2022 09:40:17 +0000 (11:40 +0200)
commit62f87022067efc6929ff9dd6cc40c685098455ec
treef4f3101936eab06cfae16ffdcfb8a0c9fa8369ab
parent832756a184dd8a73b0de8bd28af98d7a6a088c52
Bug 29957: Let check_api_auth return created cookie

The cookie created on L1496 is useless, since it is not returned.
We could either remove the cookie creation (unchanged behavior).
But since check_api_auth is expected to return a cookie when it is ok,
I opt for returning the cookie here (corrected behavior).

Test plan:
Logout in staff.
Check on staff: /cgi-bin/koha/svc/localization?id=1
You should have a 400 response.
Login with staff credentials (incl. manage_itemtypes)
Revisit same URL.
You should see a JSON response.
Check if you can hit other staff pages.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Auth.pm