fix-admin and crudify user admin

This commit is contained in:
2021-09-22 18:18:49 +02:00
parent f93c2d8d32
commit b5c2dd7bd2
21 changed files with 247 additions and 185 deletions

View File

@@ -57,15 +57,15 @@ chill_main_homepage:
path: /{_locale}/homepage
controller: Chill\MainBundle\Controller\DefaultController::indexAction
chill_main_admin_central:
path: /{_locale}/admin
controller: Chill\MainBundle\Controller\AdminController::indexAction
options:
menus:
admin_permissions:
order: 0
label: Main admin menu
# chill_main_admin_central:
# path: /{_locale}/admin
# controller: Chill\MainBundle\Controller\AdminController::indexAction
# options:
# menus:
# admin_permissions:
# order: 0
# label: Main admin menu
#
chill_main_admin_permissions:
path: /{_locale}/admin/permissions
controller: Chill\MainBundle\Controller\AdminController::indexPermissionsAction

View File

@@ -1,11 +1,6 @@
admin_center:
path: /
controller: Chill\MainBundle\Controller\CenterController::indexAction
options:
menus:
admin_permissions:
order: 100
label: Center list
admin_center_show:
path: /{id}/show
@@ -14,11 +9,6 @@ admin_center_show:
admin_center_new:
path: /new
controller: Chill\MainBundle\Controller\CenterController::newAction
options:
menus:
admin_permissions:
order: 101
label: New center
admin_center_create:
path: /create

View File

@@ -1,11 +1,6 @@
admin_permissionsgroup:
path: /
controller: Chill\MainBundle\Controller\PermissionsGroupController::indexAction
options:
menus:
admin_permissions:
order: 300
label: Permissions group list
admin_permissionsgroup_show:
path: /{id}/show
@@ -14,11 +9,6 @@ admin_permissionsgroup_show:
admin_permissionsgroup_new:
path: /new
controller: Chill\MainBundle\Controller\PermissionsGroupController::newAction
options:
menus:
admin_permissions:
order: 301
label: New permission group
admin_permissionsgroup_create:
path: /create
@@ -33,12 +23,12 @@ admin_permissionsgroup_update:
path: /{id}/update
controller: Chill\MainBundle\Controller\PermissionsGroupController::updateAction
methods: [POST, PUT]
admin_permissionsgroup_delete_role_scope:
path: /{pgid}/delete_link_role_scope/{rsid}
controller: Chill\MainBundle\Controller\PermissionsGroupController::deleteLinkRoleScopeAction
methods: [DELETE]
admin_permissionsgroup_add_role_scope:
path: /{id}/add_link_role_scope
controller: Chill\MainBundle\Controller\PermissionsGroupController::addLinkRoleScopeAction

View File

@@ -1,11 +1,6 @@
admin_scope:
path: /
controller: Chill\MainBundle\Controller\ScopeController::indexAction
options:
menus:
admin_permissions:
order: 200
label: List circles
admin_scope_show:
path: /{id}/show
@@ -14,11 +9,6 @@ admin_scope_show:
admin_scope_new:
path: /new
controller: Chill\MainBundle\Controller\ScopeController::newAction
options:
menus:
admin_permissions:
order: 201
label: New circle
admin_scope_create:
path: /create

View File

@@ -1,11 +1,6 @@
admin_user:
path: /
controller: Chill\MainBundle\Controller\UserController::indexAction
options:
menus:
admin_permissions:
order: 400
label: List users
admin_user_show:
path: /{id}/show
@@ -14,11 +9,6 @@ admin_user_show:
admin_user_new:
path: /new
controller: Chill\MainBundle\Controller\UserController::newAction
options:
menus:
admin_permissions:
order: 401
label: Add a new user
admin_user_create:
path: /create
@@ -28,7 +18,7 @@ admin_user_create:
admin_user_edit:
path: /{id}/edit
controller: Chill\MainBundle\Controller\UserController::editAction
admin_user_edit_password:
path: /{id}/edit_password
controller: Chill\MainBundle\Controller\UserController::editPasswordAction
@@ -37,17 +27,17 @@ admin_user_update:
path: /{id}/update
controller: Chill\MainBundle\Controller\UserController::updateAction
methods: [POST, PUT]
admin_user_update_password:
path: /{id}/update_password
controller: Chill\MainBundle\Controller\UserController::updatePasswordAction
methods: [POST, PUT]
admin_user_delete_group_center:
path: /{uid}/delete_link_groupcenter/{gcid}
controller: Chill\MainBundle\Controller\UserController::deleteLinkGroupCenterAction
methods: [DELETE]
admin_user_add_group_center:
path: /{uid}/add_link_groupcenter
controller: Chill\MainBundle\Controller\UserController::addLinkGroupCenterAction

View File

@@ -29,10 +29,8 @@ services:
tags: ['controller.service_arguments']
Chill\MainBundle\Controller\UserController:
arguments:
$logger: '@Psr\Log\LoggerInterface'
$validator: '@Symfony\Component\Validator\Validator\ValidatorInterface'
tags: ['controller.service_arguments']
autowire: true
autoconfigure: true
Chill\MainBundle\Controller\NotificationController:
arguments:

View File

@@ -1,17 +1,22 @@
services:
Chill\MainBundle\Routing\MenuBuilder\:
resource: '../../Routing/MenuBuilder'
autowire: true
autoconfigure: true
Chill\MainBundle\Routing\MenuBuilder\UserMenuBuilder:
arguments:
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
tags:
- { name: 'chill.menu_builder' }
Chill\MainBundle\Routing\MenuBuilder\SectionMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }
Chill\MainBundle\Routing\MenuBuilder\AdminSectionMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'