use Symfony\Component\HttpFoundation\Response; | use Symfony\Component\HttpFoundation\Response; | ||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | ||||
use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; | |||||
use Symfony\Component\Security\Core\Security; | use Symfony\Component\Security\Core\Security; | ||||
use Symfony\Component\Security\Http\Authenticator\AbstractLoginFormAuthenticator; | use Symfony\Component\Security\Http\Authenticator\AbstractLoginFormAuthenticator; | ||||
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge; | use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge; | ||||
return new Passport( | return new Passport( | ||||
new UserBadge($email, function ($userIdentifier) { | new UserBadge($email, function ($userIdentifier) { | ||||
return $this->userStore->getOneByEmail($userIdentifier); | |||||
$foundUser = $this->userStore->getOneByEmail($userIdentifier); | |||||
if ($foundUser && !$foundUser->isVerified()) { | |||||
throw new CustomUserMessageAccountStatusException('Votre compte n\'est pas encore activé, vérifier vos emails'); | |||||
} | |||||
return $foundUser; | |||||
}), | }), | ||||
new PasswordCredentials($password), | new PasswordCredentials($password), | ||||
[ | [ | ||||
{ | { | ||||
return $this->urlGenerator->generate(self::LOGIN_ROUTE); | return $this->urlGenerator->generate(self::LOGIN_ROUTE); | ||||
} | } | ||||
} | |||||
} |
// the 'name' HTML attribute of the <input> used for the password field (default: '_password') | // the 'name' HTML attribute of the <input> used for the password field (default: '_password') | ||||
'password_parameter' => 'password', | 'password_parameter' => 'password', | ||||
'forgot_password_enabled' => true | |||||
]); | ]); | ||||
} | } | ||||
->children() | ->children() | ||||
//->scalarNode('dashboard_default')->defaultValue('App\Controller\Admin\DashboardController')->end() | //->scalarNode('dashboard_default')->defaultValue('App\Controller\Admin\DashboardController')->end() | ||||
->scalarNode('homepage_route')->end() | ->scalarNode('homepage_route')->end() | ||||
->scalarNode('email_notification')->end() | |||||
->scalarNode('email_notification_name')->end() | |||||
->arrayNode('login_redirection') | ->arrayNode('login_redirection') | ||||
->children() | ->children() | ||||
->scalarNode('redirect_referer') | ->scalarNode('redirect_referer') |
.logo-admin { | .logo-admin { | ||||
max-width: 100%; | max-width: 100%; | ||||
} | } | ||||
display: table; | display: table; | ||||
} | } | ||||
.lc-draggable{width: 100%;} | .lc-draggable{width: 100%;} | ||||
.sortable{width: 100%} | |||||
.sortable{width: 100%} |
{ | { | ||||
"name": "lc/admin-bundle", | |||||
"name": "laclic/sov-bundle", | |||||
"type": "symfony-bundle", | "type": "symfony-bundle", | ||||
"description": "Administration for Symfony applications based on easyadmin", | "description": "Administration for Symfony applications based on easyadmin", | ||||
"keywords": ["backend", "admin", "generator"], | "keywords": ["backend", "admin", "generator"], | ||||
"homepage": "https://gitea.laclic.fr/Laclic/SovBundle", | |||||
"homepage": "https://forge.laclic.fr/Laclic/SovBundle", | |||||
"license": "MIT", | "license": "MIT", | ||||
"authors": [ | "authors": [ | ||||
{ | { |