Merge branch 'master' into log_detail_page

This commit is contained in:
Jan Böhmer 2023-04-29 22:46:38 +02:00
commit 4c6ceab8e8
291 changed files with 1994 additions and 1621 deletions

View file

@ -37,7 +37,7 @@ class EnsureSAMLUserForSAMLLoginChecker implements EventSubscriberInterface
$this->translator = $translator;
}
public static function getSubscribedEvents()
public static function getSubscribedEvents(): array
{
return [
AuthenticationSuccessEvent::class => 'onAuthenticationSuccess',

View file

@ -25,7 +25,6 @@ namespace App\Security;
use App\Entity\UserSystem\User;
use Symfony\Component\Security\Core\Exception\AccountStatusException;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException;
use Symfony\Component\Security\Core\Exception\DisabledException;
use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
@ -60,7 +59,7 @@ final class UserChecker implements UserCheckerInterface
return;
}
//Check if user is disabled. Then dont allow login
//Check if user is disabled. Then don't allow login
if ($user->isDisabled()) {
//throw new DisabledException();
throw new CustomUserMessageAccountStatusException($this->translator->trans('user.login_error.user_disabled', [], 'security'));

View file

@ -32,7 +32,7 @@ use function in_array;
class AttachmentVoter extends ExtendedVoter
{
protected $security;
protected Security $security;
public function __construct(PermissionManager $resolver, EntityManagerInterface $entityManager, Security $security)
{

View file

@ -118,7 +118,7 @@ class ParameterVoter extends ExtendedVoter
return $this->resolver->inherit($user, $param, $attribute) ?? false;
}
protected function supports(string $attribute, $subject)
protected function supports(string $attribute, $subject): bool
{
if (is_a($subject, AbstractParameter::class, true)) {
//These are the allowed attributes

View file

@ -69,7 +69,7 @@ class StructureVoter extends ExtendedVoter
}
/**
* Maps a instance type to the permission name.
* Maps an instance type to the permission name.
*
* @param object|string $subject The subject for which the permission name should be generated
*

View file

@ -80,7 +80,7 @@ class UserVoter extends ExtendedVoter
}
}
//Else just check users permission:
//Else just check user permission:
if ($this->resolver->isValidOperation('users', $attribute)) {
return $this->resolver->inherit($user, 'users', $attribute) ?? false;
}