Commit 1c8403ca authored by David Surville's avatar David Surville
Browse files

Merge branch 'auth_migration'

parents 24559cbb 67ffd211
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class Db extends AuthenticationIdentityProvider implements ChainableProvider, \B
        }

        /* Injection des rôles par filtre LDAP */
        $ldapRoles = $this->getRoleService()->getRoles();
        $ldapRoles = $this->roleService->findAll();
        foreach ($ldapRoles as $role) {
            if ($role->getLdapFilter() && !in_array($role, $roles)) {
                if ($this->roleMatches($role, $ldapDn)) {
+1 −1
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@

namespace UnicaenAuthentification\Service\Traits;

use UnicaenAuthentification\Service\AuthorizeService;
use RuntimeException;
use UnicaenPrivilege\Service\AuthorizeService;

/**
 * Description of AuthorizeServiceAwareTrait
+3 −5
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ use UnicaenAuthentification\Authentication\Storage\Usurpation;
use UnicaenUtilisateur\Acl\NamedRole;
use UnicaenUtilisateur\Entity\Db\AbstractUser;
use UnicaenUtilisateur\Entity\Db\AbstractRole;
use UnicaenUtilisateur\Entity\Db\Role;
use UnicaenUtilisateur\Entity\Db\RoleInterface;
use UnicaenAuthentification\Entity\Ldap\People;
use UnicaenAuthentification\Entity\Shibboleth\ShibUser;
use UnicaenAuthentification\Event\UserRoleSelectedEvent;
@@ -21,7 +21,6 @@ use UnicaenAuthentification\Provider\Identity\Chain;
use Zend\Authentication\AuthenticationService;
use Zend\EventManager\EventManagerAwareInterface;
use Zend\EventManager\EventManagerAwareTrait;
use Zend\Permissions\Acl\Role\RoleInterface;
use ZfcUser\Entity\UserInterface;

/**
@@ -156,8 +155,7 @@ class UserContext extends AbstractService implements EventManagerAwareInterface

    /**
     * @param string $roleId
     *
     * @return Role
     * @return RoleInterface|null
     */
    public function getIdentityRole($roleId)
    {
@@ -174,7 +172,7 @@ class UserContext extends AbstractService implements EventManagerAwareInterface
     *
     * Les clés du tableau sont les ID de rôles, les valeurs sont les objets Role
     *
     * @return Role[]
     * @return RoleInterface[]
     */
    public function getIdentityRoles()
    {
+4 −2
Original line number Diff line number Diff line
@@ -13,9 +13,11 @@ use Zend\View\Renderer\PhpRenderer;
 */
class CasConnectViewHelper extends AbstractConnectViewHelper
{
    const TYPE = 'cas';
    const TITLE = "Authentification centralisée";

    public function __construct()
    {
        $this->setType('cas');
        $this->setTitle("Authentification centralisée");
        $this->setType(self::TYPE);
    }
}
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -18,10 +18,12 @@ class CasConnectViewHelperFactory
        $config = $moduleOptions->getCas();

        $enabled = isset($config['enabled']) && (bool) $config['enabled'];
        $title = $config['title'] ?? null;
        $description = $config['description'] ?? null;

        $helper = new CasConnectViewHelper();
        $helper->setEnabled($enabled);
        $helper->setTitle($title ?? CasConnectViewHelper::TITLE);
        $helper->setDescription($description);

        return $helper;
Loading