Commit 3548a071 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Renommages pour clarté.

parent 1e6aaa2f
......@@ -32,7 +32,7 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
/**
* @var AuthenticationService
*/
protected $authService;
protected $authenticationService;
/**
* @var string|RoleInterface
......@@ -40,11 +40,11 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
protected $defaultRole;
/**
* @param AuthenticationService $authService
* @param AuthenticationService $authenticationService
*/
public function __construct(AuthenticationService $authService)
public function __construct(AuthenticationService $authenticationService)
{
$this->authService = $authService;
$this->authenticationService = $authenticationService;
}
/**
......@@ -56,16 +56,16 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
{
$roles = array();
$identity = $this->authService->getIdentity();
$identity = $this->authenticationService->getIdentity();
if ($identity instanceof LdapPeopleEntity) {
/* @var $identity LdapPeopleEntity */
$authorizeService = $this->getServiceLocator()->get('BjyAuthorize\Service\Authorize');
/* @var $authorizeService \BjyAuthorize\Service\Authorize */
$aclService = $this->getServiceLocator()->get('BjyAuthorize\Service\Authorize');
/* @var $aclService \BjyAuthorize\Service\Authorize */
foreach ($identity->getMemberOf() as $group) {
// vérifie si le groupe LDAP est un rôle connu des ACL
try {
$role = $authorizeService->getAcl()->getRole($group);
$role = $aclService->getAcl()->getRole($group);
}
catch (InvalidArgumentException $exc) {
continue;
......@@ -106,7 +106,7 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
public function setDefaultRole($defaultRole)
{
if (!($defaultRole instanceof RoleInterface || is_string($defaultRole))) {
throw new Exception("Rôle pr défaut fourni invalide.", null, InvalidRoleException::invalidRoleInstance($defaultRole));
throw new Exception("Rôle par défaut fourni invalide.", null, InvalidRoleException::invalidRoleInstance($defaultRole));
}
$this->defaultRole = $defaultRole;
}
......@@ -132,4 +132,4 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
{
return $this->serviceLocator;
}
}
}
\ No newline at end of file
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