mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix-admin and crudify user admin
This commit is contained in:
@@ -19,10 +19,13 @@
|
||||
|
||||
namespace Chill\MainBundle\DependencyInjection;
|
||||
|
||||
use Chill\MainBundle\Controller\UserController;
|
||||
use Chill\MainBundle\Doctrine\DQL\STContains;
|
||||
use Chill\MainBundle\Doctrine\DQL\StrictWordSimilarityOPS;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\UserJob;
|
||||
use Chill\MainBundle\Form\UserJobType;
|
||||
use Chill\MainBundle\Form\UserType;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
@@ -283,13 +286,33 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
|
||||
'template' => '@ChillMain/UserJob/index.html.twig',
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_ADMIN'
|
||||
'role' => 'ROLE_ADMIN'
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_ADMIN'
|
||||
]
|
||||
],
|
||||
],
|
||||
[
|
||||
'class' => User::class,
|
||||
'controller' => UserController::class,
|
||||
'name' => 'admin_user',
|
||||
'base_path' => '/admin/main/user2',
|
||||
'base_role' => 'ROLE_ADMIN',
|
||||
'form_class' => UserType::class,
|
||||
'actions' => [
|
||||
'index' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillMain/User/index.html.twig'
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'apis' => [
|
||||
[
|
||||
|
Reference in New Issue
Block a user