Commit fc06f5fd authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Reprise manuelle d'éléments intéressants de la branche master en prévision...

Reprise manuelle d'éléments intéressants de la branche master en prévision d'une git merge 1.2.0.x-dev vers master.
parent fb477fb9
vendor/
\ No newline at end of file
vendor/
.idea/
......@@ -9,7 +9,6 @@ use Zend\EventManager\EventInterface;
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\Feature\ServiceProviderInterface;
use Zend\Mvc\Router\Http\TreeRouteStack;
use Zend\ServiceManager\Exception\ServiceNotFoundException;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\View\Helper\Navigation;
......
{
"name": "unicaen/auth",
"description": "Module d'authentification pour les applis ZF2 de l'UCBN",
"description": "Module d'authentification pour les applications Unicaen",
"repositories": [
{
"type": "composer",
......
......@@ -5,6 +5,7 @@ namespace UnicaenAuth\Entity\Db;
use Doctrine\ORM\Mapping as ORM;
/**
* Privilege entity class.
*
* @ORM\Entity
* @ORM\Table(name="privilege")
......
......@@ -5,7 +5,7 @@ namespace UnicaenAuth\Entity\Db;
use Doctrine\ORM\Mapping as ORM;
/**
* User entity class.
* Role entity class.
*
* @ORM\Entity
* @ORM\Table(name="user_role")
......
......@@ -9,13 +9,14 @@ use UnicaenApp\Util;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorAwareTrait;
use Zend\Stdlib\Hydrator\HydratorInterface;
use Zend\InputFilter\InputFilterProviderInterface;
/**
* Description of RoleForm
*
* @author Laurent LECLUSE <laurent.lecluse at unicaen.fr>
*/
class RoleForm extends Form implements ServiceLocatorAwareInterface
class RoleForm extends Form implements ServiceLocatorAwareInterface, InputFilterProviderInterface
{
use ServiceLocatorAwareTrait;
use RoleServiceAwareTrait;
......
......@@ -25,7 +25,7 @@ trait PrivilegeProviderAwareTrait
/**
*
* @return PrivilegeProviderInterface
* @throws \Common\Exception\RuntimeException
* @throws \Exception
*/
public function getPrivilegeProvider()
{
......
......@@ -3,7 +3,6 @@
namespace UnicaenAuth\Service;
use UnicaenAuth\Entity\Db\Privilege;
use Zend\ServiceManager\Exception\InvalidArgumentException;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
......
......@@ -64,8 +64,8 @@ class RoleService extends AbstractService
* Sauvegarde le rôle en BDD
*
* @param RoleInterface $role
*
* @return self
* @throws \Doctrine\ORM\OptimisticLockException
*/
public function save(RoleInterface $role)
{
......@@ -79,8 +79,8 @@ class RoleService extends AbstractService
* Supprime un rôle
*
* @param RoleInterface $role
*
* @return $this
* @throws \Doctrine\ORM\OptimisticLockException
*/
public function delete(RoleInterface $role)
{
......
......@@ -3,7 +3,6 @@
namespace UnicaenAuth\Service;
use UnicaenAuth\Entity\Db\Role;
use Zend\ServiceManager\Exception\InvalidArgumentException;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
......@@ -14,7 +13,6 @@ class RoleServiceFactory implements FactoryInterface
$config = $serviceLocator->get('Config');
if (! isset($config['unicaen-auth']['role_entity_class'])) {
// throw new InvalidArgumentException("La classe de l'entité rôle n'a pas été trouvée dans la config");
$config['unicaen-auth']['role_entity_class'] = Role::class;
}
......
......@@ -172,6 +172,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface
get_called_class(),
]);
$this->eventManager = $eventManager;
return $this;
}
......@@ -182,6 +183,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface
public function setOptions(ModuleOptions $options)
{
$this->options = $options;
return $this;
}
......@@ -193,6 +195,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface
if (!$this->options instanceof ModuleOptions) {
$this->setOptions($this->getServiceLocator()->get('unicaen-auth_module_options'));
}
return $this->options;
}
......@@ -203,6 +206,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface
public function setZfcUserOptions(ZfcUserModuleOptions $options)
{
$this->zfcUserOptions = $options;
return $this;
}
......@@ -214,6 +218,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface
if (!$this->zfcUserOptions instanceof ZfcUserModuleOptions) {
$this->setZfcUserOptions($this->getServiceLocator()->get('zfcuser_module_options'));
}
return $this->zfcUserOptions;
}
}
\ No newline at end of file
......@@ -50,6 +50,8 @@ class RedirectionStrategy extends \BjyAuthorize\View\RedirectionStrategy
}
}
$event->setParam('redirected', true);
// délégation à la stratégie standard de redirection vers la page d'authentification
return parent::onDispatchError($event);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment