chore: update wording of inline comments
This commit is contained in:
@@ -11,18 +11,13 @@ use Monolog\Level;
|
|||||||
use Monolog\LogRecord;
|
use Monolog\LogRecord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monolog handler that persists log entries to the database.
|
* Persists log entries to the database.
|
||||||
*
|
*
|
||||||
* Writes log records to the log_entry table, replacing message placeholders
|
* The write goes through DBAL rather than the EntityManager on purpose. A log record can be emitted
|
||||||
* with context values. Includes channel, context, and extra data for auditing.
|
* halfway through somebody else's unit of work, and an EntityManager flush would write out whatever
|
||||||
* Only processes INFO level and above to avoid storing debug messages.
|
* that unit of work has pending — which is how a half-built User once reached the database with a
|
||||||
*
|
* NULL password. Staying out of the UnitOfWork also keeps logging alive after a failed flush has
|
||||||
* The write goes through the DBAL connection rather than the EntityManager on purpose. A log record
|
* closed the EntityManager, which is exactly when there is something worth logging.
|
||||||
* can be emitted at any point, including halfway through somebody else's unit of work, and an
|
|
||||||
* EntityManager flush would write out whatever that unit of work has pending so far — which is how
|
|
||||||
* a half-built User once reached the database with a NULL password. Staying out of the UnitOfWork
|
|
||||||
* also keeps logging alive after a failed flush has closed the EntityManager, which is exactly when
|
|
||||||
* there is something worth logging.
|
|
||||||
*
|
*
|
||||||
* Reads still go through the LogEntry entity and its repository.
|
* Reads still go through the LogEntry entity and its repository.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ use Symfony\Component\Security\Http\Util\TargetPathTrait;
|
|||||||
/**
|
/**
|
||||||
* Authenticates users against the BPN API.
|
* Authenticates users against the BPN API.
|
||||||
*
|
*
|
||||||
* Validates credentials via BPN's getPersonalData endpoint and creates or updates
|
* The password is kept, RSA-encrypted, because every later BPN call needs it again.
|
||||||
* local User entities. Passwords are stored encrypted with RSA for subsequent API calls.
|
|
||||||
*
|
*
|
||||||
* BusPro owns the whole role set and the hotel codes: both are synced on every login, in both
|
* BusPro owns the whole role set and the hotel codes: both are synced on every login, in both
|
||||||
* directions, so anything the CRM no longer reports is withdrawn here. What the CRM claims is
|
* directions, so anything the CRM no longer reports is withdrawn here. What the CRM claims is
|
||||||
@@ -65,7 +64,7 @@ class BpnAuthenticator extends AbstractLoginFormAuthenticator implements Authent
|
|||||||
$email = trim($request->request->getString('_username'));
|
$email = trim($request->request->getString('_username'));
|
||||||
$passwordPlain = trim($request->request->getString('_password'));
|
$passwordPlain = trim($request->request->getString('_password'));
|
||||||
|
|
||||||
// Very lame hashing applied here as required by BPN
|
// BPN requires md5, not a real hash
|
||||||
$password = md5($passwordPlain);
|
$password = md5($passwordPlain);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -179,8 +178,7 @@ class BpnAuthenticator extends AbstractLoginFormAuthenticator implements Authent
|
|||||||
$targetPath = $this->getTargetPath($request->getSession(), $firewallName)
|
$targetPath = $this->getTargetPath($request->getSession(), $firewallName)
|
||||||
?? $this->urlGenerator->generate('app_account');
|
?? $this->urlGenerator->generate('app_account');
|
||||||
|
|
||||||
// When redirecting to admin from an HTMX request, force a full page navigation
|
// A full load avoids hx-boost layout issues
|
||||||
// to avoid layout issues between front- (hx-boost) and backend
|
|
||||||
if ($request->headers->has('HX-Request') && str_contains($targetPath, '/admin')) {
|
if ($request->headers->has('HX-Request') && str_contains($targetPath, '/admin')) {
|
||||||
return new HxRedirectResponse($targetPath);
|
return new HxRedirectResponse($targetPath);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user