From 781610350395c249d8a5a765452da26afeab0173 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 24 Jan 2022 14:23:29 +0000 Subject: [PATCH] Bug 29914: (QA follow-up) Add comment to explain last case Signed-off-by: Nick Clemens JD amended patch: remove ref to line number (cherry picked from commit a866722ae620f435c3c5e1933a83f7b82927c108) Signed-off-by: Victor Grousset/tuxayo (cherry picked from commit 0886a2f1e607272feb2fa101f7616343a02223be) Signed-off-by: Wainui Witika-Park --- C4/Auth.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index d9b87672b6..42000dde49 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1796,6 +1796,8 @@ sub check_cookie_auth { } else { return ( "anon", $session ); } + # If here user was logged in, but doesn't have correct permissions + # could be an 'else' at `if($flags) return "ok"` , but left here to catch any errors $session->delete(); $session->flush; C4::Context->_unset_userenv($sessionID); -- 2.39.5