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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);