]> git.koha-community.org Git - koha.git/commit
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)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 15 Apr 2022 11:15:20 +0000 (07:15 -0400)
commit5ff26617f826bdace06366cf71436c9074bcab5c
treecb2c89ab287e2b30ea1555abb2097ce18d92007e
parent2e6d87e84024db268c183b4d53ebf8c52fc39dbd
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Auth.pm