mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-01 14:04:30 +02:00
Fixed typos
This commit is contained in:
parent
63df16a369
commit
d04d743520
144 changed files with 263 additions and 265 deletions
|
@ -47,12 +47,12 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
|||
use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
/**
|
||||
* This event subscriber write to event log when entities are changed, removed, created.
|
||||
* This event subscriber writes to the event log when entities are changed, removed, created.
|
||||
*/
|
||||
class EventLoggerSubscriber implements EventSubscriber
|
||||
{
|
||||
/**
|
||||
* @var array The given fields will not be saved, because they contain sensitive informations
|
||||
* @var array The given fields will not be saved, because they contain sensitive information
|
||||
*/
|
||||
protected const FIELD_BLACKLIST = [
|
||||
User::class => ['password', 'need_pw_change', 'googleAuthenticatorSecret', 'backupCodes', 'trustedDeviceCookieVersion', 'pw_reset_token', 'backupCodesGenerationDate'],
|
||||
|
@ -128,7 +128,7 @@ class EventLoggerSubscriber implements EventSubscriber
|
|||
|
||||
public function postPersist(LifecycleEventArgs $args): void
|
||||
{
|
||||
//Create an log entry, we have to do this post persist, cause we have to know the ID
|
||||
//Create a log entry, we have to do this post persist, because we have to know the ID
|
||||
|
||||
/** @var AbstractDBElement $entity */
|
||||
$entity = $args->getObject();
|
||||
|
@ -158,7 +158,7 @@ class EventLoggerSubscriber implements EventSubscriber
|
|||
{
|
||||
$em = $args->getObjectManager();
|
||||
$uow = $em->getUnitOfWork();
|
||||
// If the we have added any ElementCreatedLogEntries added in postPersist, we flush them here.
|
||||
// If we have added any ElementCreatedLogEntries added in postPersist, we flush them here.
|
||||
$uow->computeChangeSets();
|
||||
if ($uow->hasPendingInsertions() || !empty($uow->getScheduledEntityUpdates())) {
|
||||
$em->flush();
|
||||
|
@ -196,7 +196,7 @@ class EventLoggerSubscriber implements EventSubscriber
|
|||
}
|
||||
}
|
||||
|
||||
//By default allow every field.
|
||||
//By default, allow every field.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
|||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
|
||||
/**
|
||||
* Write to event log when a user tries to access an forbidden page and recevies an 403 Access Denied message.
|
||||
* Write to event log when a user tries to access a forbidden page and receives an 403 Access Denied message.
|
||||
*/
|
||||
class LogAccessDeniedSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
|
||||
/**
|
||||
* This subscriber writes entries to log if an security related event happens (e.g. the user changes its password).
|
||||
* This subscriber writes entries to log if a security related event happens (e.g. the user changes its password).
|
||||
*/
|
||||
final class SecurityEventLoggerSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ final class SecurityEventLoggerSubscriber implements EventSubscriberInterface
|
|||
$ip = $request->getClientIp() ?? 'unknown';
|
||||
} else {
|
||||
$ip = 'Console';
|
||||
//Dont try to apply IP filter rules to non numeric string
|
||||
//Don't try to apply IP filter rules to non-numeric string
|
||||
$anonymize = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||
use Symfony\Component\HttpKernel\Event\ResponseEvent;
|
||||
|
||||
/**
|
||||
* This subscriber sets an Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests.
|
||||
* This subscriber sets a Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests.
|
||||
*/
|
||||
final class SymfonyDebugToolbarSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ use Symfony\Component\Security\Http\SecurityEvents;
|
|||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* This event listener shows an login successful flash to the user after login and write the login to event log.
|
||||
* This event listener shows a login successful flash to the user after login and write the login to event log.
|
||||
*/
|
||||
final class LoginSuccessSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
|
|
|
@ -31,8 +31,8 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
|||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
/**
|
||||
* This subscriber is used to log out a disabled user, as soon as he to do an request.
|
||||
* It is not possible for him to login again, afterwards.
|
||||
* This subscriber is used to log out a disabled user, as soon as he to do a request.
|
||||
* It is not possible for him to login again, afterward.
|
||||
*/
|
||||
final class LogoutDisabledUserSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ final class LogoutDisabledUserSubscriber implements EventSubscriberInterface
|
|||
{
|
||||
$user = $this->security->getUser();
|
||||
if ($user instanceof User && $user->isDisabled()) {
|
||||
//Redirect to login
|
||||
//Redirect to log in
|
||||
$response = new RedirectResponse($this->urlGenerator->generate('logout'));
|
||||
$event->setResponse($response);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
|
|||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
/**
|
||||
* The purpose of this event subscriber is to check if the permission schema of the current user is up to date and upgrade it automatically if needed.
|
||||
* The purpose of this event subscriber is to check if the permission schema of the current user is up-to-date and upgrade it automatically if needed.
|
||||
*/
|
||||
class UpgradePermissionsSchemaSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue