Commit d558f40c authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Priv

parent 8cb83a18
Loading
Loading
Loading
Loading
+3 −3
Changes for composer.json: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -13,9 +13,9 @@
    "unicaen/authentification": "^5.0",
    "unicaen/utilisateur": "^5.0.5",
    "unicaen/privilege": "^5.0",
    "unicaen/renderer": "5.0.5",
    "unicaen/pdf": "5.0.1",
    "unicaen/mail": "5.0.3",
    "unicaen/renderer": "^5.0.5",
    "unicaen/pdf": "^5.0.1",
    "unicaen/mail": "^5.0.3",
    "unicaen/parametre": "^5.0",
    "unicaen/bjy-authorize": "^4",
    "unicaen/ldap": "^4",
+1 −2
Changes for config/application.config.php: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -44,12 +44,11 @@ $modules = [
    'UnicaenAide',
//    'UnicaenAlerte',
    'UnicaenIndicateur',

    'EntretienProfessionnel',
    'Carriere',
    'Metier',
    'Formation',
    'Structure',
    'Formation',
    'Fichier',
    'Element',
    'Application',
+67 −1
Changes for module/Formation/config/merged/agent.config.php: 67 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@

namespace Formation;

use Application\Controller\AgentController;
use Formation\Provider\Privilege\FormationagentPrivileges;
use UnicaenPrivilege\Guard\PrivilegeController;
use Laminas\Router\Http\Literal;
use Laminas\Router\Http\Segment;
@@ -15,11 +17,75 @@ return [
        ],
    ],

    'navigation'      => [
        'formation' => [
            'home' => [
                'pages' => [
                    'mes-agents' => [
                        'order' => 200,
                        'label' => 'Mes agents',
                        'route' => 'formation/mes-agents',
                        'resource' => FormationagentPrivileges::getResourceId(FormationagentPrivileges::FORMATIONAGENT_MESAGENTS),
                        'dropdown-header' => true,
                        'pages' => [],
                    ],
                    'gestion-formation' => [
                        'pages' => [
                            'agent' => [
                                'order' => 420,
                                'label' => 'Agent',
                                'route' => 'formation/agent',
                                'resource' => FormationagentPrivileges::getResourceId(FormationagentPrivileges::FORMATIONAGENT_AFFICHER),
                                'icon' => 'fas fa-angle-right',
                            ],
                        ],
                    ],

                ],
            ],
        ],
    ],
    'router'          => [
        'routes' => [
            'formation' => [
                'child_routes' => [
                    'agent-index' => [
                        'type'  => Literal::class,
                        'options' => [
                            'route'    => '/agent-index',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'index',
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                    'agent' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/agent[/:agent]',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'afficher',
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                    'mes-agents' => [
                        'type'  => Literal::class,
                        'options' => [
                            'route'    => '/mes-agents',
                            'defaults' => [
                                'controller' => AgentController::class,
                                'action'     => 'mes-agents',
                            ],
                        ],
                        'may_terminate' => true,
                    ],
                ],
            ],
        ],
    ],

    'service_manager' => [
        'factories' => [],
    ],
+14 −27
Changes for module/Formation/config/merged/structure.config.php: 14 added lines, 27 removed lines.
Original line number Diff line number Diff line
@@ -4,11 +4,10 @@ namespace Formation;

use Formation\Controller\StructureController;
use Formation\Controller\StructureControllerFactory;
use Formation\Provider\Privilege\FormationPrivileges;
use Formation\Provider\Privilege\PlanformationPrivileges;
use UnicaenPrivilege\Guard\PrivilegeController;
use Formation\Provider\Privilege\FormationstructurePrivileges;
use Laminas\Router\Http\Literal;
use Laminas\Router\Http\Segment;
use UnicaenPrivilege\Guard\PrivilegeController;

return [
    'bjyauthorize' => [
@@ -18,10 +17,9 @@ return [
                    'controller' => StructureController::class,
                    'action' => [
                        'index',
                        'afficher',
                    ],
                    'privileges' => [ //TODO privileges
                        FormationPrivileges::FORMATION_MODIFIER,
                    'privilege' => [
                        FormationstructurePrivileges::getResourceId(FormationstructurePrivileges::FORMATIONSTRUCTURE_INDEX),
                    ],
                ],
                [
@@ -29,8 +27,9 @@ return [
                    'action' => [
                        'afficher',
                    ],
                    'privileges' => [ //TODO privileges
                        PlanformationPrivileges::PLANFORMATION_COURANT,
                    'privilege' => [
                        FormationstructurePrivileges::getResourceId(FormationstructurePrivileges::FORMATIONSTRUCTURE_AFFICHER),
                        FormationstructurePrivileges::getResourceId(FormationstructurePrivileges::FORMATIONSTRUCTURE_MESSTRUCTURES),
                    ],
                ],
            ],
@@ -42,11 +41,10 @@ return [
            'home' => [
                'pages' => [
                    'mes-structures' => [
                        'order' => 100,
                        'order' => 200,
                        'label' => 'Mes structures',
                        'route' => 'formation/structure',
//                        'route' => 'gestion',
                        'resource' => PrivilegeController::getResourceId(StructureController::class, 'afficher'),
                        'resource' => FormationstructurePrivileges::getResourceId(FormationstructurePrivileges::FORMATIONSTRUCTURE_MESSTRUCTURES),
                        'dropdown-header' => true,
                        'pages' => [],
                    ],
@@ -56,9 +54,9 @@ return [
                            [
                                'label' => 'Gestion des ressources',
                                'route' => 'formation/structure/index',
                                'resource' =>
                                    PrivilegeController::getResourceId(StructureController::class, 'index'),

                                'resource' => //todo revoir la navigation
                                    FormationstructurePrivileges::getResourceId(FormationstructurePrivileges::FORMATIONSTRUCTURE_INDEX),
//                                    FormationagentPrivileges::getResourceId(FormationagentPrivileges::FORMATIONAGENT_INDEX)
                                'order'    => 400,
                                'dropdown-header' => true,
                            ],
@@ -66,7 +64,8 @@ return [
                                'order' => 420,
                                'label' => 'Structure',
                                'route' => 'formation/structure-index',
                                'resource' => PrivilegeController::getResourceId(StructureController::class, 'index'),
                                'resource' =>
                                    FormationstructurePrivileges::getResourceId(FormationstructurePrivileges::FORMATIONSTRUCTURE_INDEX),
                                'icon' => 'fas fa-angle-right',
                            ],
                        ],
@@ -102,18 +101,6 @@ return [
                            ],
                        ],
                        'may_terminate' => true,
                        'child_routes' => [
                            'index' => [
                                'type'  => Segment::class,
                                'options' => [
                                    'route'    => '/index',
                                    'defaults' => [
                                        'controller' => StructureController::class,
                                        'action'     => 'index',
                                    ],
                                ],
                            ],
                        ],
                    ],
                ],
            ],
+12 −0
Changes for module/Formation/src/Formation/Provider/Privilege/FormationagentPrivileges.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Formation\Provider\Privilege;

use UnicaenPrivilege\Provider\Privilege\Privileges;

class FormationagentPrivileges extends Privileges
{
    const FORMATIONAGENT_INDEX = 'formationagent-formationagent_index';
    const FORMATIONAGENT_AFFICHER = 'formationagent-formationagent_afficher';
    const FORMATIONAGENT_MESAGENTS = 'formationagent-formationagent_mesagents';
}
 No newline at end of file
Loading