Commit 398f8d51 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction plantage dû au type du paramètre 'role' de...

Correction plantage dû au type du paramètre 'role' de \UnicaenAuth\Provider\Identity\Db::roleMatches() trop restrictif
parent 2ed36d74
Pipeline #5921 failed with stage
in 11 seconds
......@@ -5,6 +5,7 @@ use BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider;
use BjyAuthorize\Provider\Role\ProviderInterface;
use UnicaenApp\Entity\Ldap\People;
use UnicaenAuth\Entity\Db\AbstractRole;
use UnicaenAuth\Entity\Db\RoleInterface;
use UnicaenAuth\Service\Traits\RoleServiceAwareTrait;
use Zend\Ldap\Ldap;
use ZfcUser\Entity\UserInterface;
......@@ -90,12 +91,12 @@ class Db extends AuthenticationIdentityProvider implements ChainableProvider, \B
/**
* @param AbstractRole $role
* @param RoleInterface $role
* @param string $dn
*
* @return bool
*/
protected function roleMatches(AbstractRole $role, $dn)
protected function roleMatches(RoleInterface $role, $dn)
{
try {
return 1 === $this->getLdap()->count($role->getLdapFilter(), $dn, Ldap::SEARCH_SCOPE_SUB);
......
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