mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-04 23:44:33 +02:00
Log security related events like password reset, 2FA method added, etc.
This commit is contained in:
parent
1b21bf5ddd
commit
470cd2af9e
13 changed files with 485 additions and 8 deletions
|
@ -52,6 +52,7 @@ use App\Entity\LogSystem\ElementDeletedLogEntry;
|
|||
use App\Entity\LogSystem\ElementEditedLogEntry;
|
||||
use App\Entity\LogSystem\ExceptionLogEntry;
|
||||
use App\Entity\LogSystem\InstockChangedLogEntry;
|
||||
use App\Entity\LogSystem\SecurityEventLogEntry;
|
||||
use App\Entity\LogSystem\UserLoginLogEntry;
|
||||
use App\Entity\LogSystem\UserLogoutLogEntry;
|
||||
use App\Entity\LogSystem\UserNotAllowedLogEntry;
|
||||
|
@ -127,7 +128,7 @@ class LogEntryExtraFormatter
|
|||
protected function getInternalFormat(AbstractLogEntry $context): array
|
||||
{
|
||||
$array = [];
|
||||
if ($context instanceof UserLoginLogEntry || $context instanceof UserLogoutLogEntry) {
|
||||
if ($context instanceof UserLoginLogEntry || $context instanceof UserLogoutLogEntry || $context instanceof SecurityEventLogEntry) {
|
||||
$array['log.user_login.ip'] = htmlspecialchars($context->getIPAddress());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue