Emit audit log upon impersonation.
This commit is contained in:
parent
934b016541
commit
61daa21d3a
2 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,7 @@ if(CSRF::validateRequest() && $canEdit) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($allowToImpersonate) {
|
if($allowToImpersonate) {
|
||||||
|
$msz->createAuditLog('USER_IMPERSONATE', [$userInfo->getId(), $userInfo->getUsername()]);
|
||||||
$authToken->setImpersonatedUserId($userInfo->getId());
|
$authToken->setImpersonatedUserId($userInfo->getId());
|
||||||
$authToken->applyCookie();
|
$authToken->applyCookie();
|
||||||
url_redirect('index');
|
url_redirect('index');
|
||||||
|
|
|
@ -135,5 +135,7 @@ class AuditLogInfo {
|
||||||
|
|
||||||
'ROLE_CREATE' => 'Created role #%d.',
|
'ROLE_CREATE' => 'Created role #%d.',
|
||||||
'ROLE_UPDATE' => 'Updated role #%d.',
|
'ROLE_UPDATE' => 'Updated role #%d.',
|
||||||
|
|
||||||
|
'USER_IMPERSONATE' => 'Impersonated user #%d %s.',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue