Commit a4f8c8a3 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge remote-tracking branch 'origin/master' into ll-wf-finitions

parents ef8586ae a43f93fe
Loading
Loading
Loading
Loading
Loading
+4
Changes for CHANGELOG.md: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,10 @@ Pensez à installer l'extention php calendar si ce n'est pas déjà le cas.

# OSE 24.11 (à venir)

## Nouveautés

* Nouvel état de sortie pour l'offre de formation permettant d'affiner par rapport au besoin de chaque établissement l'export de l'offre de formation

## Corrections

* Bonne prise en compte de l'ordonnancement des statuts au niveau des données personnelles (#63380)
+12 −5
Changes for module/Application/src/Provider/Identity/IdentityProvider.php: 12 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace Application\Provider\Identity;

use Application\Entity\Db\Affectation;
use Application\Entity\Db\Role;
use Application\Service\RoleService;
use Application\Service\Traits\ContextServiceAwareTrait;
use BjyAuthorize\Provider\Identity\ProviderInterface as IdentityProviderInterface;
use Intervenant\Service\IntervenantServiceAwareTrait;
@@ -38,8 +39,10 @@ class IdentityProvider implements ChainableProvider, IdentityProviderInterface

    public function clearIdentityRoles(): void
    {
        $session                = $this->getSessionContainer();
        $session->identityRoles = [];
        $session = RoleService::getSession();
        if ($session->offsetExists('identityRoles')) {
            $session->offsetUnset('identityRoles');
        }
    }


@@ -49,16 +52,20 @@ class IdentityProvider implements ChainableProvider, IdentityProviderInterface
     */
    public function getIdentityRoles(): array
    {
        $session = $this->getSessionContainer();
        if (!$this->getServiceContext()->getUtilisateur()) {
            // pas d'utilisateur, on est forcément guest
            return ['guest' => 'guest'];
        }
        //Sinon on regarde si il y a des rôles en session
        $session = RoleService::getSession();
        // pas de cache si on est que guest
        if (!$session->offsetExists('identityRoles') || empty($session->identityRoles) || count($session->identityRoles) < 2) {
        if (!$session->offsetExists('identityRoles')) {
            $filter = $this->getEntityManager()->getFilters()->enable('historique');
            $filter->init([
                              Role::class,
                              Affectation::class,
                          ]);

            $identityRoles = ['guest' => 'guest'];

            $inEtablissement = $this->getHostLocalization()->inEtablissement();

+4
Changes for module/Application/src/Provider/Role/RoleProvider.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ class RoleProvider implements ProviderInterface, EntityManagerAwareInterface
     */
    public function getRoles(): array
    {
        if (!$this->getServiceContext()->getUtilisateur()) {
            return [];
        }
        return $this->makeRoles();
        $session = RoleService::getSession();
        if (!$session->offsetExists('roles') || empty($session->roles)) {
            $session->roles = $this->makeRoles();
+4
Changes for module/Application/src/Service/PrivilegeService.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -75,6 +75,10 @@ class PrivilegeService implements PrivilegeProviderInterface, ProviderInterface
     */
    public function getPrivilegesRoles(): array
    {
        if (!$this->getServiceContext()->getUtilisateur()) {
            return [];
        }

        $session = RoleService::getSession();

        if (!$session->offsetExists('privilegesRoles') || empty($session->privilegesRoles)) {
+2 −8
Changes for module/Intervenant/view/intervenant/statut/saisie.phtml: 2 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ $canAdd = $this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_STA
                if ($s->getTypeIntervenant() == $typeIntervenant) {
                    $url    = $this->url('statut/saisie', ['statut' => $s->getId()]);
                    $active = $s == $statut ? ' active' : '';
                    echo $this->tag('a', ['class' => 'list-group-item' . $active, 'href' => $url])->html($s) . "\n";
                    echo $this->tag('a', ['class' => 'list-group-item' . $active,
                                          'href'  => $url])->html($s) . "\n";
                }
            }
            echo '</div>';
@@ -429,13 +430,6 @@ $canAdd = $this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_STA
            },


            donneesContactVisu: function () {
                var visible = this.el('dossierContact').is(':checked');

                this.element.find('.donneesContactDetails').toggle(visible);
            },


            servicesVisu: function () {
                var visible = !(this.el('servicePrevu').val() == 'desactive' && this.el('serviceRealise').val() == 'desactive');