Commit 7520ae46 authored by lecluse's avatar lecluse
Browse files

Création d'un nouveau module UnicaenImport détaché de OSE et transfert du code vers ce dernier.

Début d'adaptation de la saisie des services à la gestion des privilèges
parent 1f6e692c
......@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "5f156bad9957174c0a65ed9272dc6092",
"content-hash": "3bb8f2fba1529d939e569e09276fa188",
"hash": "06d39b4dea269c39c0d9a0200a979a24",
"content-hash": "725848bb2bb100f615caa9e1e0ebed41",
"packages": [
{
"name": "bjyoungblood/bjy-authorize",
......@@ -1066,16 +1066,16 @@
},
{
"name": "symfony/console",
"version": "v3.0.4",
"version": "v3.0.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "6b1175135bc2a74c08a28d89761272de8beed8cd"
"reference": "34a214710e0714b6efcf40ba3cd1e31373a97820"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/6b1175135bc2a74c08a28d89761272de8beed8cd",
"reference": "6b1175135bc2a74c08a28d89761272de8beed8cd",
"url": "https://api.github.com/repos/symfony/console/zipball/34a214710e0714b6efcf40ba3cd1e31373a97820",
"reference": "34a214710e0714b6efcf40ba3cd1e31373a97820",
"shasum": ""
},
"require": {
......@@ -1122,7 +1122,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2016-03-16 17:00:50"
"time": "2016-04-28 09:48:42"
},
{
"name": "symfony/polyfill-mbstring",
......@@ -1185,16 +1185,16 @@
},
{
"name": "symfony/process",
"version": "v2.8.4",
"version": "v2.8.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "fb467471952ef5cf8497c029980e556b47545333"
"reference": "1276bd9be89be039748cf753a2137f4ef149cd74"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/fb467471952ef5cf8497c029980e556b47545333",
"reference": "fb467471952ef5cf8497c029980e556b47545333",
"url": "https://api.github.com/repos/symfony/process/zipball/1276bd9be89be039748cf753a2137f4ef149cd74",
"reference": "1276bd9be89be039748cf753a2137f4ef149cd74",
"shasum": ""
},
"require": {
......@@ -1230,7 +1230,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2016-03-23 13:11:46"
"time": "2016-04-14 15:22:22"
},
{
"name": "unicaen/unicaen-app",
......@@ -1238,7 +1238,7 @@
"source": {
"type": "svn",
"url": "https://svn.unicaen.fr/svn/UnicaenApp",
"reference": "/trunk/@690"
"reference": "/trunk/@704"
},
"require": {
"doctrine/doctrine-orm-module": ">=0.7",
......@@ -1288,12 +1288,12 @@
"source": {
"type": "svn",
"url": "https://svn.unicaen.fr/svn/UnicaenAuth",
"reference": "/trunk/@269"
"reference": "/trunk/@281"
},
"require": {
"bjyoungblood/bjy-authorize": ">=1.4",
"jasig/phpcas": ">=1.3.3",
"unicaen/unicaen-app": "dev-trunk",
"unicaen/unicaen-app": ">=1.2.2",
"zf-commons/zfc-user-doctrine-orm": ">=0.1"
},
"require-dev": {
......@@ -1338,6 +1338,30 @@
},
"description": "Boite à outils pour la programmation avec la bibliothèque Unicaen"
},
{
"name": "unicaen/unicaen-import",
"version": "dev-trunk",
"source": {
"type": "svn",
"url": "https://svn.unicaen.fr/svn/UnicaenImport",
"reference": "/trunk/@3"
},
"require-dev": {
"phpunit/phpunit": ">=3.7"
},
"type": "library",
"autoload": {
"psr-0": {
"UnicaenImport": "src/",
"UnicaenImportTest": "tests/"
},
"classmap": [
"./Module.php"
]
},
"description": "Boite à outils pour la programmation avec la bibliothèque Unicaen",
"time": "2016-05-03 15:31:16"
},
{
"name": "zendframework/zend-authentication",
"version": "2.4.9",
......@@ -4465,7 +4489,7 @@
},
{
"name": "symfony/yaml",
"version": "v3.0.4",
"version": "v3.0.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
......@@ -4625,6 +4649,7 @@
"unicaen/unicaen-auth": 20,
"bjyoungblood/bjy-authorize": 20,
"unicaen/unicaen-code": 20,
"unicaen/unicaen-import": 20,
"zendframework/zend-developer-tools": 20
},
"prefer-stable": false,
......
......@@ -4,8 +4,8 @@ $env = getenv('APPLICATION_ENV') ?: 'production';
$modules = [
'ZfcBase', 'DoctrineModule', 'DoctrineORMModule', 'ZfcUser', 'ZfcUserDoctrineORM', 'BjyAuthorize',
'UnicaenApp', 'UnicaenAuth',
'Application', 'Import',
'UnicaenApp', 'UnicaenAuth', 'UnicaenImport',
'Application' //, 'Import',
];
$moduleListenerOptions = [
......
<?php
namespace Application;
return [
'unicaen-import' => [
'differentiel_view_helpers' => [
'CHEMIN_PEDAGOGIQUE' => View\Helper\Import\CheminPedagogiqueViewHelper::class,
'ELEMENT_PEDAGOGIQUE' => View\Helper\Import\ElementPedagogiqueViewHelper::class,
'INTERVENANT' => View\Helper\Import\IntervenantViewHelper::class,
'PERSONNEL' => View\Helper\Import\PersonnelViewHelper::class,
'ETAPE' => View\Helper\Import\EtapeViewHelper::class,
],
],
];
\ No newline at end of file
......@@ -69,9 +69,9 @@ SELECT
ep.fa,ep.taux_fa,
ep.fc,ep.taux_fc,
-- NOUVEAUX TAUX FI FA FC
0 /100 n_taux_fi,
100 /100 n_taux_fi,
0 /100 n_taux_fa,
100 /100 n_taux_fc
0 /100 n_taux_fc
-- FIN DES NOUVEAUX TAUX FI FA FC
FROM
element_pedagogique ep
......@@ -83,15 +83,37 @@ WHERE
-- FILTRES
1 = ose_divers.comprise_entre( ep.histo_creation,ep.histo_destruction )
--AND s.code <> 'OSE'
AND e.source_code = 'DUPLCI_211'
AND e.source_code IN (
'L1DROI_301',
'L2DROI_301',
'LCDR13_211',
'LCDR13_212',
'LCDR13_213',
'LCDRA0_400',
'LCDRD0_500',
'MSDCD0_500',
'MSDGD0_500',
'MSDR03_205',
'MSDR04_201',
'MSDR04_206',
'MSDR05_202',
'MSDR07_201',
'MSDT04_204',
'MSDT08_201',
'L1DROI_303',
'L2DROI_303'
)
AND ep.annee_id = 2015
-- FIN DES FILTRES
) t1
WHERE
taux_fi <> n_taux_fi
OR taux_fa <> n_taux_fa
OR taux_fc <> n_taux_fc; -- Que s'il y a des différences
1=1
OR (
taux_fi <> n_taux_fi
OR taux_fa <> n_taux_fa
OR taux_fc <> n_taux_fc -- Que s'il y a des différences
)
;
select * from element_taux_regimes where id = 44174;
......@@ -134,14 +156,29 @@ SELECT * FROM ELEMENT_PEDAGOGIQUE WHERE source_code like '%DUUE%';
select source_code from etape where source_code in (
'ORTH01_201',
'ORTH02_201',
'ORTH03_201',
'DUPLCI_211'
'L1DROI_301',
'L2DROI_301',
'LCDR13_211',
'LCDR13_212',
'LCDR13_213',
'LCDRA0_400',
'LCDRD0_500',
'MSDCD0_500',
'MSDGD0_500',
'MSDR03_205',
'MSDR04_201',
'MSDR04_206',
'MSDR05_202',
'MSDR07_201',
'MSDT04_204',
'MSDT08_201',
'L1DROI_303',
'L2DROI_303'
) order by source_code;
select * from etape where source_code like
'%DUPLCI%'
'%L1DROI%'
order by source_code;
\ No newline at end of file
......@@ -93,10 +93,10 @@ class Module implements ConsoleUsageProviderInterface, ConsoleBannerProviderInte
$role = $e->getApplication()->getServiceManager()->get('ApplicationContext')->getSelectedIdentityRole();
$routeMatch = $e->getRouteMatch();
if ($role && $intervenant = $role->getIntervenant()) {
if (($value = $routeMatch->getParam($name = 'intervenant')) && $value != $intervenant->getSourceCode()) {
$routeMatch->setParam($name, $intervenant->getSourceCode());
if (($value = $routeMatch->getParam($name = 'intervenant')) && $value != $intervenant->getRouteParam()) {
$routeMatch->setParam($name, $intervenant->getRouteParam());
}
$routeMatch->setParam('intervenant', $intervenant->getSourceCode());
$routeMatch->setParam('intervenant', $intervenant->getRouteParam());
}
}
......
......@@ -120,7 +120,6 @@ return array(
'Application\Entity\Db\VIndicDepassRef' => __DIR__ . '/src/Application/Entity/Db/VIndicDepassRef.php',
'Application\Entity\Db\VIndicAttenteValidEnsAutre' => __DIR__ . '/src/Application/Entity/Db/VIndicAttenteValidEnsAutre.php',
'Application\Entity\Db\Departement' => __DIR__ . '/src/Application/Entity/Db/Departement.php',
'Application\Entity\Db\Repository\IntervenantRepository' => __DIR__ . '/src/Application/Entity/Db/Repository/IntervenantRepository.php',
'Application\Entity\Db\FormuleVolumeHoraireReferentiel' => __DIR__ . '/src/Application/Entity/Db/FormuleVolumeHoraireReferentiel.php',
'Application\Entity\Db\FormuleResultatVolumeHoraireReferentiel' => __DIR__ . '/src/Application/Entity/Db/FormuleResultatVolumeHoraireReferentiel.php',
'Application\Entity\Db\VIndicAttenteMep' => __DIR__ . '/src/Application/Entity/Db/VIndicAttenteMep.php',
......@@ -199,7 +198,6 @@ return array(
'Application\Entity\Db\Traits\PieceJointeAwareTrait' => __DIR__ . '/src/Application/Entity/Db/Traits/PieceJointeAwareTrait.php',
'Application\Entity\Db\Traits\NotificationIndicateurAwareTrait' => __DIR__ . '/src/Application/Entity/Db/Traits/NotificationIndicateurAwareTrait.php',
'Application\Entity\Db\Traits\TypeDotationAwareTrait' => __DIR__ . '/src/Application/Entity/Db/Traits/TypeDotationAwareTrait.php',
'Application\Entity\Db\Traits\SourceAwareTrait' => __DIR__ . '/src/Application/Entity/Db/Traits/SourceAwareTrait.php',
'Application\Entity\Db\Traits\GroupeTypeFormationAwareTrait' => __DIR__ . '/src/Application/Entity/Db/Traits/GroupeTypeFormationAwareTrait.php',
'Application\Entity\Db\Traits\ServiceAwareTrait' => __DIR__ . '/src/Application/Entity/Db/Traits/ServiceAwareTrait.php',
'Application\Entity\Db\Traits\TypeModulateurAwareTrait' => __DIR__ . '/src/Application/Entity/Db/Traits/TypeModulateurAwareTrait.php',
......@@ -305,7 +303,6 @@ return array(
'Application\Entity\Db\Agrement' => __DIR__ . '/src/Application/Entity/Db/Agrement.php',
'Application\Entity\Db\Personnel' => __DIR__ . '/src/Application/Entity/Db/Personnel.php',
'Application\Entity\Db\ElementModulateur' => __DIR__ . '/src/Application/Entity/Db/ElementModulateur.php',
'Application\Entity\Db\Source' => __DIR__ . '/src/Application/Entity/Db/Source.php',
'Application\Entity\Db\FormuleIntervenant' => __DIR__ . '/src/Application/Entity/Db/FormuleIntervenant.php',
'Application\Entity\Db\WfEtape' => __DIR__ . '/src/Application/Entity/Db/WfEtape.php',
'Application\Entity\Db\TypeDotation' => __DIR__ . '/src/Application/Entity/Db/TypeDotation.php',
......
......@@ -104,7 +104,6 @@ return [
[
'controller' => 'Application\Controller\Gestion',
'action' => ['index'],
'roles' => [R_COMPOSANTE, R_ADMINISTRATEUR],
'privileges' => [
Privileges::MISE_EN_PAIEMENT_EXPORT_PAIE,
Privileges::MISE_EN_PAIEMENT_VISUALISATION,
......
......@@ -22,7 +22,7 @@ return [
],
'may_terminate' => true,
'child_routes' => [
'rechercher' => [
'rechercher' => [
'type' => 'Literal',
'options' => [
'route' => '/rechercher',
......@@ -31,7 +31,7 @@ return [
],
],
],
'recherche' => [
'recherche' => [
'type' => 'Literal',
'options' => [
'route' => '/recherche',
......@@ -40,7 +40,7 @@ return [
],
],
],
'voir' => [
'voir' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant',
......@@ -52,7 +52,7 @@ return [
],
],
],
'fiche' => [
'fiche' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/fiche',
......@@ -64,7 +64,7 @@ return [
],
],
],
'saisir' => [
'saisir' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/saisir',
......@@ -76,7 +76,7 @@ return [
],
],
],
'voir-heures-comp' => [
'voir-heures-comp' => [
'type' => 'Segment',
'options' => [
'route' => '/voir-heures-comp/:intervenant',
......@@ -88,7 +88,7 @@ return [
],
],
],
'formule-totaux-hetd' => [
'formule-totaux-hetd' => [
'type' => 'Segment',
'options' => [
'route' => '/formule-totaux-hetd/:intervenant/:typeVolumeHoraire/:etatVolumeHoraire',
......@@ -102,7 +102,7 @@ return [
],
],
],
'feuille-de-route' => [
'feuille-de-route' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/feuille-de-route',
......@@ -114,7 +114,7 @@ return [
],
],
],
'modification-service-du' => [
'modification-service-du' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/modification-service-du',
......@@ -127,7 +127,7 @@ return [
],
],
],
'services' => [
'services' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/services',
......@@ -135,13 +135,13 @@ return [
'intervenant' => '[0-9]*',
],
'defaults' => [
'controller' => 'Application\Controller\Service',
'action' => 'index',
'controller' => 'Application\Controller\Intervenant',
'action' => 'services',
'type-volume-horaire-code' => Entity\Db\TypeVolumeHoraire::CODE_PREVU,
],
],
],
'referentiel' => [
'referentiel' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/referentiel',
......@@ -155,7 +155,7 @@ return [
],
],
],
'services-realises' => [
'services-realises' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/services-realises',
......@@ -163,13 +163,13 @@ return [
'intervenant' => '[0-9]*',
],
'defaults' => [
'controller' => 'Application\Controller\Service',
'action' => 'index',
'controller' => 'Application\Controller\Intervenant',
'action' => 'services',
'type-volume-horaire-code' => Entity\Db\TypeVolumeHoraire::CODE_REALISE,
],
],
],
'referentiel-realise' => [
'referentiel-realise' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/referentiel',
......@@ -183,7 +183,7 @@ return [
],
],
],
'cloturer-saisie' => [
'cloturer-saisie' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/services/:type-volume-horaire-code/cloturer',
......@@ -197,7 +197,7 @@ return [
],
],
],
'demande-mise-en-paiement' => [
'demande-mise-en-paiement' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/demande-mise-en-paiement',
......@@ -210,7 +210,7 @@ return [
],
],
],
'contrat' => [
'contrat' => [
'type' => 'Segment',
'options' => [
'route' => '/:intervenant/contrat',
......@@ -291,6 +291,7 @@ return [
],
'workflow-etape-code' => WfEtape::CODE_SERVICE_SAISIE,
'withtarget' => true,
'resource' => PrivilegeController::getResourceId('Application\Controller\Intervenant', 'services'),
'visible' => 'assertionService',
],
'pieces-jointes-saisie' => [
......@@ -327,6 +328,7 @@ return [
],
'workflow-etape-code' => WfEtape::CODE_SERVICE_SAISIE_REALISE,
'withtarget' => true,
'resource' => PrivilegeController::getResourceId('Application\Controller\Intervenant', 'services'),
'visible' => 'assertionService',
],
'validation-service-realise' => [
......@@ -336,15 +338,7 @@ return [
// coquille vide qui réserve l'emplacement du menu
],
'demande-mise-en-paiement' => [
'label' => "Demande de mise en paiement",
'title' => "Demande de mise en paiement",
'route' => 'intervenant/demande-mise-en-paiement',
'paramsInject' => [
'intervenant',
],
'withtarget' => true,
'resource' => PrivilegeController::getResourceId('Application\Controller\Paiement', 'demandeMiseEnPaiement'),
//'visible' => 'IntervenantNavigationPageVisibility',
// coquille vide qui réserve l'emplacement du menu
],
],
],
......@@ -364,11 +358,20 @@ return [
],
[
'controller' => 'Application\Controller\Intervenant',
'action' => ['index', 'voir', 'fiche'],
'action' => ['index', 'voir', 'fiche', 'menu'],
'privileges' => [
Privileges::INTERVENANT_FICHE,
],
],
[
'controller' => 'Application\Controller\Intervenant',
'action' => ['services'],
'privileges' => [
Privileges::ENSEIGNEMENT_VISUALISATION,
Privileges::REFERENTIEL_VISUALISATION,
],
'assertion' => 'assertionService',
],
[
'controller' => 'Application\Controller\Intervenant',
'action' => ['saisir'],
......@@ -392,17 +395,20 @@ return [
],
],
[
'controller' => 'Application\Controller\Intervenant',
'controller' => 'Application\Controller\Intervenant', /// @todo transférer l'action depuis le contrôleur de service
'action' => ['cloturer-saisie'],
'privileges' => [
Privileges::ENSEIGNEMENT_CLOTURE,
],
'assertion' => 'assertionIntervenant',
],
[ /// @todo à protéger d'avantage...
'controller' => 'Application\Controller\Intervenant',
'action' => ['formule-totaux-hetd'],
'roles' => ['user'],
[
'controller' => 'Application\Controller\Intervenant',
'action' => ['formule-totaux-hetd'],
'privileges' => [
Privileges::ENSEIGNEMENT_VISUALISATION,
Privileges::REFERENTIEL_VISUALISATION,
],
],
],
],
......@@ -443,6 +449,7 @@ return [
'ApplicationTypeIntervenant' => Service\TypeIntervenant::class,
'assertionIntervenant' => Assertion\IntervenantAssertion::class,
'ModificationServiceDuAssertion' => Assertion\ModificationServiceDuAssertion::class,
'processusIntervenant' => Processus\IntervenantProcessus::class,
],
],
'view_helpers' => [
......
......@@ -2,6 +2,7 @@
namespace Application;
use UnicaenAuth\Provider\Rule\PrivilegeRuleProvider;
const R_ADMINISTRATEUR = Acl\AdministrateurRole::ROLE_ID;
const R_COMPOSANTE = Acl\ComposanteRole::ROLE_ID;
const R_ETABLISSEMENT = Acl\EtablissementRole::ROLE_ID;
......@@ -32,10 +33,10 @@ $main = [
'configuration' => [
'orm_default' => [
'string_functions' => [
'CONVERT' => ORM\Query\Functions\Convert::class,
'REPLACE' => ORM\Query\Functions\Replace::class,
'compriseEntre' => ORM\Query\Functions\OseDivers\CompriseEntre::class,
'pasHistorise' => ORM\Query\Functions\OseDivers\PasHistorise::class,
'CONVERT' => ORM\Query\Functions\Convert::class,
'REPLACE' => ORM\Query\Functions\Replace::class,
'compriseEntre' => ORM\Query\Functions\OseDivers\CompriseEntre::class,
'pasHistorise' => ORM\Query\Functions\OseDivers\PasHistorise::class,
],
'filters' => [
'historique' => ORM\Filter\HistoriqueFilter::class,
......@@ -122,7 +123,7 @@ $main = [
'bjyauthorize' => [
'identity_provider' => 'ApplicationIdentityProvider',
'role_providers' => [
'role_providers' => [
'ApplicationRoleProvider' => [
Acl\Role::class,
......@@ -136,7 +137,7 @@ $main = [
Acl\IntervenantPermanentRole::class,
],
],
'guards' => [
'guards' => [
\BjyAuthorize\Guard\Controller::class => [
[
'controller' => 'Application\Controller\Index',
......@@ -145,30 +146,45 @@ $main = [
],
],
],
'resource_providers' => [
\BjyAuthorize\Provider\Resource\Config::class => [
'Information' => [],
],
],
'rule_providers' => [
PrivilegeRuleProvider::class => [
'allow' => [
[
'roles' => ['user'],
'resources' => 'Information',
'assertion' => 'assertionInformation',
],
],
],
],
],
'service_manager' => [
'invokables' => [
'ApplicationAnnee' => Service\Annee::class,
'ApplicationContext' => Service\Context::class,
'ApplicationLocalContext' => Service\LocalContext::class,
'ApplicationParametres' => Service\Parametres::class,
'ApplicationUtilisateur' => Service\Utilisateur::class,