Add a query string 'msg=access_denied' when denying access to a logged-in user, such that we may display it nicely on the frontend?

This commit is contained in:
Alexandre Aubin 2023-11-28 19:59:13 +01:00
parent 3336464481
commit f81ae9d5c5

View file

@ -349,7 +349,7 @@ else
logger:debug("Redirecting to portal : " .. portal_url) logger:debug("Redirecting to portal : " .. portal_url)
if is_logged_in then if is_logged_in then
return ngx.redirect(portal_url) return ngx.redirect(portal_url.."?msg=access_denied")
else else
local back_url = "https://" .. ngx.var.host .. ngx.var.uri .. uri_args_string() local back_url = "https://" .. ngx.var.host .. ngx.var.uri .. uri_args_string()