Security Can_Request log the security for Ajax

This commit is contained in:
Dany wm De Bontridder 2020-11-01 13:04:51 +01:00 committed by sparkyx
parent c4d8630c5c
commit df9d424bec

View file

@ -745,7 +745,7 @@ class User
/**\brief Check if the user can access
* otherwise warn and exit
* \param $p_action requested action
* \param $p_js = 1 javascript, or 0 just a text
* \param $p_js = 1 javascript, or 0 just a text or 2 to log it silently
* \return nothing the program exits automatically
*/
@ -760,6 +760,9 @@ class User
echo "alert ('Cette action ne vous est pas autorisée. Contactez votre responsable');";
echo "</script>";
}
elseif ($p_js == 2) {
record_log(_("Access invalid").$p_action);
}
else
{
echo '<div class="redcontent">';