Parcourir la source

Connexion / déconnexion utilisateur

master
Guillaume il y a 3 ans
Parent
révision
6ee51c1d25
5 fichiers modifiés avec 39 ajouts et 27 suppressions
  1. +1
    -1
      config/packages/lc_sov.yaml
  2. +3
    -1
      config/packages/security.yaml
  3. +16
    -18
      config/routes.yaml
  4. +3
    -1
      config/services.yaml
  5. +16
    -6
      src/Controller/Admin/DashboardController.php

+ 1
- 1
config/packages/lc_sov.yaml Voir le fichier

@@ -1,3 +1,3 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
lc_sov:
homepage_route: '_homepage'
homepage_route: 'home'

+ 3
- 1
config/packages/security.yaml Voir le fichier

@@ -14,7 +14,9 @@ security:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

main:
pattern: ^/
anonymous: true
lazy: true
provider: app_user_provider
@@ -22,7 +24,7 @@ security:
authenticators:
- Lc\SovBundle\Authenticator\LoginFormAuthenticator
logout:
path: logout
path: sov_logout
# where to redirect after logout
# target: app_any_route


+ 16
- 18
config/routes.yaml Voir le fichier

@@ -1,23 +1,21 @@

lc_admin_dashboard:
path: /admin
controller: App\Controller\Admin\DashboardController::index
login:
path: /login
controller: Lc\SovBundle\Controller\Admin\SecurityController::login
logout:
path: /logout
controller: Lc\SovBundle\Admin\SecurityController::logout
sov_bundle:
resource: "@LcSovBundle/Resources/config/routes.yaml"
prefix: /

artgris_bundle_file_manager:
resource: "@ArtgrisFileManagerBundle/Controller"
type: annotation
prefix: /manager
resource: "@ArtgrisFileManagerBundle/Controller"
type: annotation
prefix: /manager

admin_dashboard:
path: /admin
controller: App\Controller\Admin\DashboardController::index

_homepage:
path: /
defaults: { _controller: App\Controller\IndexController::index , _locale: fr}
_page:
path: /page/{pageSlug}
controller: App\Controller\IndexController::page
home:
path: /
defaults: { _controller: App\Controller\IndexController::index , _locale: fr}

page:
path: /page/{pageSlug}
controller: App\Controller\IndexController::page

+ 3
- 1
config/services.yaml Voir le fichier

@@ -30,7 +30,6 @@ services:
resource: '../src/Controller/'
tags: ['controller.service_arguments']


Lc\SovBundle\:
resource: '../Lc/SovBundle/'
exclude:
@@ -43,6 +42,9 @@ services:
resource: '../Lc/SovBundle/Controller/'
tags: [ 'controller.service_arguments' ]

Lc\SovBundle\Controller\Admin\:
resource: '../Lc/SovBundle/Controller/Admin/'
tags: [ 'controller.service_arguments' ]

Lc\CaracoleBundle\:
resource: '../Lc/CaracoleBundle/'

+ 16
- 6
src/Controller/Admin/DashboardController.php Voir le fichier

@@ -17,15 +17,25 @@ class DashboardController extends LcDashboardController

public function configureMenuItems(): iterable
{
$submenuUser = [
MenuItem::linkToCrud('Utilisateurs', '', User::class),
MenuItem::linkToCrud('Groupes d\'utilisateurs', '', GroupUser::class),
];

yield MenuItem::linkToDashboard('Tableau de bord', 'circle');
yield MenuItem::subMenu('Utilisateurs', 'user')->setSubItems($submenuUser);

yield MenuItem::subMenu('Utilisateurs', 'user')->setSubItems(
[
MenuItem::linkToCrud('Utilisateurs', '', User::class),
MenuItem::linkToCrud('Groupes d\'utilisateurs', '', GroupUser::class),
]
);

yield MenuItem::linkToCrud('Pages', 'copy', Page::class);
yield MenuItem::linkToCrud('TVA', 'circle', TaxRate::class);

yield MenuItem::subMenu('Mon compte', 'user')->setSubItems(
[
MenuItem::linkToRoute('Informations personnelles', '', 'sov_admin_account_profile'),
MenuItem::linkToRoute('Mot de passe', '', 'sov_admin_account_password'),
]
);

/*
MenuItem::section('Blog'),
MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class),

Chargement…
Annuler
Enregistrer