Browse Source

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

feature/ticket
Guillaume 3 years ago
parent
commit
394341d1c2
2 changed files with 4 additions and 3 deletions
  1. +1
    -2
      Authenticator/LoginFormAuthenticator.php
  2. +3
    -1
      Controller/AbstractAdminController.php

+ 1
- 2
Authenticator/LoginFormAuthenticator.php View File



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

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


$roles = $user->getRoles(); $roles = $user->getRoles();


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

+ 3
- 1
Controller/AbstractAdminController.php View File



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

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

Loading…
Cancel
Save