Loading Module.php +18 −3 Original line number Diff line number Diff line Loading @@ -58,9 +58,14 @@ class Module implements ConfigProviderInterface, ViewHelperProviderInterface, Se $services = $application->getServiceManager(); // transmission des ACL aux aides de vue de navigation try { $authorizeService = $services->get('BjyAuthorize\Service\Authorize'); /* @var $authorizeService \BjyAuthorize\Service\Authorize */ \Zend\View\Helper\Navigation::setDefaultAcl($authorizeService->getAcl()); \Zend\View\Helper\Navigation::setDefaultRole($authorizeService->getIdentity()); } catch (\Zend\ServiceManager\Exception\ServiceNotFoundException $snfe) { // pas de module BjyAuthorize : pas d'ACL } /* @var $options Options\ModuleOptions */ $options = $services->get('unicaen-auth_module_options'); Loading Loading @@ -153,6 +158,16 @@ class Module implements ConfigProviderInterface, ViewHelperProviderInterface, Se { return array( 'factories' => array( 'zfcuser_user_mapper' => function ($sm) { $config = $sm->get('configuration'); $em = isset($config['doctrine']['connection']['orm_auth']) ? 'doctrine.entitymanager.orm_auth' : 'doctrine.entitymanager.orm_default'; return new \ZfcUserDoctrineORM\Mapper\User( $sm->get($em), $sm->get('zfcuser_module_options') ); }, 'unicaen-auth_user_service' => function () { return new Service\User(); }, Loading config/module.config.php +12 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ $settings = array( ); $zfcuserSettings = array( /** * Enable registration Loading Loading @@ -57,6 +58,7 @@ $zfcuserSettings = array( 100 => 'UnicaenAuth\Authentication\Adapter\Cas', // ensuite (si échec d'authentification Db) ), ); $bjyauthorize = array( /* this module uses a meta-role that inherits from any roles that should * be applied to the active user. the identity provider tells us which Loading Loading @@ -112,6 +114,14 @@ return array( 'zfcuser' => $zfcuserSettings, 'bjyauthorize' => $bjyauthorize, 'unicaen-auth' => $settings, 'doctrine' => array( 'entitymanager' => array( 'orm_auth' => array( 'connection' => 'orm_auth', 'configuration' => 'orm_default' ) ), ), 'service_manager' => array( 'abstract_factories' => array( 'UnicaenAuth\Authentication\Adapter\AbstractFactory', Loading Loading @@ -143,7 +153,7 @@ return array( ), 'controllers' => array( 'invokables' => array( 'unicaen-auth' => 'UnicaenAuth\Controller\UtilisateurController', ), ), 'view_manager' => array( Loading config/unicaen-auth.global.php.dist +2 −3 Original line number Diff line number Diff line Loading @@ -12,9 +12,8 @@ $settings = array( */ 'save_ldap_user_in_database' => false, /** * Enable registration * Allows users to register through the website. * Accepted values: boolean true or false * Flag indiquant si l'utilisateur peut s'enregistrer auprès de l'application * (i.e. créer un compte dans la table des utilisateurs). */ 'enable_registration' => false, ); Loading config/unicaen-auth.local.php.dist +19 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,24 @@ * drop this config file in it and change the values as you wish. */ $settings = array( /** * Connexion à la base de donnée d'authentification via Doctrine. * Décommenter pour spécifier une connexion autre que la connexion principale 'orm_default'. */ // 'doctrine' => array( // 'connection' => array( // 'orm_auth' => array( // 'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver', // 'params' => array( // 'host' => 'localhost', // 'port' => '3306', // 'user' => 'root', // 'password' => 'root', // 'dbname' => 'authdb', // ) // ), // ), // ), /** * Paramètres de connexion au serveur CAS : * - pour désactiver l'authentification CAS, le tableau 'cas' doit être vide. Loading Loading @@ -36,4 +54,5 @@ $settings = array( */ return array( 'unicaen-auth' => $settings, 'doctrine' => isset($settings['doctrine']) ? $settings['doctrine'] : array(), ); No newline at end of file Loading
Module.php +18 −3 Original line number Diff line number Diff line Loading @@ -58,9 +58,14 @@ class Module implements ConfigProviderInterface, ViewHelperProviderInterface, Se $services = $application->getServiceManager(); // transmission des ACL aux aides de vue de navigation try { $authorizeService = $services->get('BjyAuthorize\Service\Authorize'); /* @var $authorizeService \BjyAuthorize\Service\Authorize */ \Zend\View\Helper\Navigation::setDefaultAcl($authorizeService->getAcl()); \Zend\View\Helper\Navigation::setDefaultRole($authorizeService->getIdentity()); } catch (\Zend\ServiceManager\Exception\ServiceNotFoundException $snfe) { // pas de module BjyAuthorize : pas d'ACL } /* @var $options Options\ModuleOptions */ $options = $services->get('unicaen-auth_module_options'); Loading Loading @@ -153,6 +158,16 @@ class Module implements ConfigProviderInterface, ViewHelperProviderInterface, Se { return array( 'factories' => array( 'zfcuser_user_mapper' => function ($sm) { $config = $sm->get('configuration'); $em = isset($config['doctrine']['connection']['orm_auth']) ? 'doctrine.entitymanager.orm_auth' : 'doctrine.entitymanager.orm_default'; return new \ZfcUserDoctrineORM\Mapper\User( $sm->get($em), $sm->get('zfcuser_module_options') ); }, 'unicaen-auth_user_service' => function () { return new Service\User(); }, Loading
config/module.config.php +12 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ $settings = array( ); $zfcuserSettings = array( /** * Enable registration Loading Loading @@ -57,6 +58,7 @@ $zfcuserSettings = array( 100 => 'UnicaenAuth\Authentication\Adapter\Cas', // ensuite (si échec d'authentification Db) ), ); $bjyauthorize = array( /* this module uses a meta-role that inherits from any roles that should * be applied to the active user. the identity provider tells us which Loading Loading @@ -112,6 +114,14 @@ return array( 'zfcuser' => $zfcuserSettings, 'bjyauthorize' => $bjyauthorize, 'unicaen-auth' => $settings, 'doctrine' => array( 'entitymanager' => array( 'orm_auth' => array( 'connection' => 'orm_auth', 'configuration' => 'orm_default' ) ), ), 'service_manager' => array( 'abstract_factories' => array( 'UnicaenAuth\Authentication\Adapter\AbstractFactory', Loading Loading @@ -143,7 +153,7 @@ return array( ), 'controllers' => array( 'invokables' => array( 'unicaen-auth' => 'UnicaenAuth\Controller\UtilisateurController', ), ), 'view_manager' => array( Loading
config/unicaen-auth.global.php.dist +2 −3 Original line number Diff line number Diff line Loading @@ -12,9 +12,8 @@ $settings = array( */ 'save_ldap_user_in_database' => false, /** * Enable registration * Allows users to register through the website. * Accepted values: boolean true or false * Flag indiquant si l'utilisateur peut s'enregistrer auprès de l'application * (i.e. créer un compte dans la table des utilisateurs). */ 'enable_registration' => false, ); Loading
config/unicaen-auth.local.php.dist +19 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,24 @@ * drop this config file in it and change the values as you wish. */ $settings = array( /** * Connexion à la base de donnée d'authentification via Doctrine. * Décommenter pour spécifier une connexion autre que la connexion principale 'orm_default'. */ // 'doctrine' => array( // 'connection' => array( // 'orm_auth' => array( // 'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver', // 'params' => array( // 'host' => 'localhost', // 'port' => '3306', // 'user' => 'root', // 'password' => 'root', // 'dbname' => 'authdb', // ) // ), // ), // ), /** * Paramètres de connexion au serveur CAS : * - pour désactiver l'authentification CAS, le tableau 'cas' doit être vide. Loading Loading @@ -36,4 +54,5 @@ $settings = array( */ return array( 'unicaen-auth' => $settings, 'doctrine' => isset($settings['doctrine']) ? $settings['doctrine'] : array(), ); No newline at end of file