From 09d6d7c0a33bec9d5689b57812e8b15a20f4e70f Mon Sep 17 00:00:00 2001 From: lecluse <lecluse@d57fa8bc-6af1-4de9-8b7d-78e900e231e7> Date: Wed, 10 Jun 2015 07:33:02 +0000 Subject: [PATCH] v1.5.3 --- config/autoload/unicaen-app.global.php | 4 +-- data/Sql/privileges.sql | 29 +++++-------------- .../Provider/Role/RoleProvider.php | 6 ++-- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/config/autoload/unicaen-app.global.php b/config/autoload/unicaen-app.global.php index 3f7618288e..0a35f94406 100644 --- a/config/autoload/unicaen-app.global.php +++ b/config/autoload/unicaen-app.global.php @@ -12,8 +12,8 @@ $settings = [ 'app_infos' => [ 'nom' => "OSE", 'desc' => "Organisation des Services d'Enseignement", - 'version' => "1.5.1", - 'date' => "04/06/2015", + 'version' => "1.5.3", + 'date' => "10/06/2015", 'contact' => ['mail' => "Contactez votre composante.", /*'tel' => "01 02 03 04 05"*/], 'mentionsLegales' => "http://www.unicaen.fr/outils-portail-institutionnel/mentions-legales/", 'informatiqueEtLibertes' => "http://www.unicaen.fr/outils-portail-institutionnel/informatique-et-libertes/", diff --git a/data/Sql/privileges.sql b/data/Sql/privileges.sql index dabe29acf5..354d5eb5f6 100644 --- a/data/Sql/privileges.sql +++ b/data/Sql/privileges.sql @@ -24,33 +24,20 @@ INSERT INTO PRIVILEGE ( select - --p.id, cp.code categorie, p.code privilege, - ' const ' - || rpad( upper( replace( cp.code, '-', '_' ) || '_' || replace( p.code, '-', '_' ) ), MAX( length( cp.code ) + length( p.code ) ) OVER (PARTITION BY 1 )+1, ' ' ) - || ' = ' || '''' || cp.code || '-' || p.code || '''' || ';' php_const + p.id, cp.code categorie, p.code privilege + --' const ' + -- || rpad( upper( replace( cp.code, '-', '_' ) || '_' || replace( p.code, '-', '_' ) ), MAX( length( cp.code ) + length( p.code ) ) OVER (PARTITION BY 1 )+1, ' ' ) + -- || ' = ' || '''' || cp.code || '-' || p.code || '''' || ';' php_const from privilege p join categorie_privilege cp on cp.id = p.categorie_id order by - cp.code, p.code; + cp.code, p.ordre; - - --- EXPORT -role_privilege -statut_privilege -; +update privilege set ordre = 1 where id = 6; +update privilege set ordre = 2 where id = 5; +update privilege set ordre = 3 where id = 10; -SELECT 'INSERT INTO PERIMETRE ( - ID, - CODE, - LIBELLE - ) VALUES ( - PERIMETRE_ID_SEQ.NEXTVAL, - ''' || code || ''', - q''$' || libelle || '$'' - );' -FROM perimetre; \ No newline at end of file diff --git a/module/Application/src/Application/Provider/Role/RoleProvider.php b/module/Application/src/Application/Provider/Role/RoleProvider.php index 182e463672..efeae6177c 100644 --- a/module/Application/src/Application/Provider/Role/RoleProvider.php +++ b/module/Application/src/Application/Provider/Role/RoleProvider.php @@ -113,10 +113,10 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface /** @deprecated */ if ($roleId == 'gestionnaire-composante') { $roleClass = 'Application\Acl\GestionnaireComposanteRole'; $parent='composante';} if ($roleId == 'directeur-composante') { $roleClass = 'Application\Acl\DirecteurComposanteRole'; $parent='composante';} - if ($roleId == 'administrateur') { $roleClass = 'Application\Acl\AdministrateurRole';} + if ($roleId == 'administrateur') { $roleClass = 'Application\Acl\AdministrateurRole'; } if ($roleId == 'responsable-composante') { $roleClass = 'Application\Acl\ResponsableComposanteRole'; $parent='composante';} - if ($roleId == 'superviseur-etablissement') { $roleClass = 'Application\Acl\EtablissementRole'; } - if ($roleId == 'gestionnaire-drh') { $roleClass = 'Application\Acl\DrhRole'; } + if ($roleId == 'superviseur-etablissement') { $roleClass = 'Application\Acl\EtablissementRole'; } + if ($roleId == 'gestionnaire-drh') { $roleClass = 'Application\Acl\DrhRole'; } /* FIN de deprecated */ $role = new $roleClass( $roleId, $parent, $dbRole->getLibelle() ); -- GitLab