Commit 514c87d9 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Correction de soucis en cas de rôle défini sans périmètre (rôles par défaut, etc.)

parent b60b18ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ class UserProfileSelectRadioItem extends UnicaenAuthViewHelper
    {
        $html = parent::render();

        $perimetre = $this->role->getPerimetre();
        $perimetre = $this->role ? $this->role->getPerimetre() : null;

        if ($this->role->getPeutChangerStructure() && $perimetre && $perimetre->isEtablissement()) {
            $selectClass = 'user-profile-select-input-structure';
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ class UserProfileSelectRadioItemFactory extends UserProfileSelectFactory

        $role = $this->getServiceContext()->getSelectedIdentityRole();

        if ($role && $role->getPerimetre()->isEtablissement()) {
        if ($role && $role->getPerimetre() && $role->getPerimetre()->isEtablissement()) {
            $service->setStructure($this->getServiceContext()->getStructure(false));
        }