Commit df362444 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : Erreur de récupération de l'identifiant pour les connexions via LDAP...

Fix : Erreur de récupération de l'identifiant pour les connexions via LDAP (liè au déplacement de la configuration du "username")
parent d5fabc7d
Loading
Loading
Loading
Loading
Loading
+0 −0

Empty file added.

+1 −1
Changes for module/Oscar/src/Oscar/Controller/PublicController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -96,7 +96,6 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
        /** @var Authentification $auth */
        $auth = $this->getOscarUserContextService()->getAuthentification();


        if (!$this->getCurrentPerson()) {
            throw new OscarException("Votre compte n'est associé à aucune fiche Personne dans Oscar");
        }
@@ -210,6 +209,7 @@ class PublicController extends AbstractOscarController implements UseTimesheetSe
            'declarationsConfiguration' => null,
            //$timesheetService->getDeclarationConfigurationPerson($this->getCurrentPerson()),
            'person' => $this->getCurrentPerson(),
            'authentification' => $this->getOscarUserContextService()->getAuthentification(),
            'declarationsHours' => $declarationsHours,
            'declarationsHoursOverwriteByAuth' => $declarationsHoursOverwriteByAuth,
            'parameters' => $auth->getSettings() ?: [],
+2 −6
Changes for module/Oscar/src/Oscar/Service/OscarUserContext.php: 2 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -882,12 +882,8 @@ class OscarUserContext implements UseOscarConfigurationService, UseLoggerService
                $person = null;
                if ($this->getUserContext()->getLdapUser()) {
                    // PATCH : Ensam (Matthieu MARC), 2020-08
                    $attribute = $this->getOscarConfigurationService()->getServiceLocator()->get(
                        'Config'
                    )['unicaen-auth']['ldap_username'];
                    if (isset($attribute)) {
                        $pseudo = $this->getUserContext()->getLdapUser()->getData($attribute);
                    }
                    // PATCH 2026 : l'attribut LDAP a été déplacé
                    $pseudo = $this->getUserContext()->getLdapUser()->getSupannAliasLogin();

                    // PATCH Limoges
                    // au cas ou le supannAliasLogin n'est pas fournis...
+2 −1
Changes for module/Oscar/view/oscar/public/parameters.phtml: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@
                                    <em>Jamais</em>
                                <?php endif; ?>
                                <br/>
                                Créé le <time><?= $this->moment($person->getDateCreated())->full() ?></time>
                                Créé le <time><?= $this->moment($person->getDateCreated())->full() ?></time><br>
                                Dernière connexion <time><?= $this->moment($authentification->getDateLogin())->full() ?></time>
                            </p>

                            <table class="table table-bordered small">