Parcourir la source

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/SovBundle into develop

feature/ticket
Guillaume il y a 3 ans
Parent
révision
394341d1c2
2 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. +1
    -2
      Authenticator/LoginFormAuthenticator.php
  2. +3
    -1
      Controller/AbstractAdminController.php

+ 1
- 2
Authenticator/LoginFormAuthenticator.php Voir le fichier

@@ -111,7 +111,6 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator implements P

if (isset($useReferer) && $useReferer == true) {
$url = $request->request->get('_target_path');

} else {
$user = $this->entityManager->getRepository(UserInterface::class)->findOneBy(['email' => $email]);

@@ -119,7 +118,7 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator implements P
$roles = $user->getRoles();

foreach ($rolesRedirection as $roleRedirect) {
if (array_search($roleRedirect['role'], $roles)) {
if (in_array($roleRedirect['role'], $roles)) {
$routeName = $roleRedirect['redirect'];
}
}

+ 3
- 1
Controller/AbstractAdminController.php Voir le fichier

@@ -268,7 +268,9 @@ abstract class AbstractAdminController extends EaAbstractCrudController

public function configureFields(string $pageName): iterable
{
if ($this->isInstanceOf(SortableInterface::class)) {
$seoPanel = $confPanel = array();

if ($this->isInstanceOf(SeoInterface::class)) {
$seoPanel = [
FormField::addPanel('seo')->setTemplateName('crud/field/generic'),
TextField::new('metaTitle')->setLabel('Meta Title')->setHelp(

Chargement…
Annuler
Enregistrer