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

Fix : Erreur du formulaire de création/mise à jour d'une activité de recherche...

Fix : Erreur du formulaire de création/mise à jour d'une activité de recherche (Affichage de l'erreur)
parent cb97922e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1253,7 +1253,8 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif
        }

        if (!$this->getOscarUserContextService()->hasPrivileges(Privileges::ACTIVITY_CREATE)) {
            if (!$this->getOscarUserContextService()->hasPrivilegeInOrganizations(Privileges::ACTIVITY_CREATE)) {
            if (!$this->getOscarUserContextService()->hasPrivilegeInOrganizations(
                Privileges::ACTIVITY_CREATE)) {
                throw new UnAuthorizedException(_("Vous n'avez pas les droits pour créer une nouvelle activité"));
            }
            $organisationsUser = $this->getOscarUserContextService()->getCurrentUserOrganisationWithPrivilege(
+3 −0
Original line number Diff line number Diff line
@@ -127,6 +127,9 @@ class ProjectGrantFormHydrator implements HydratorInterface, UseServiceContainer

    protected function getActivityType( $typeId )
    {
        // Fix : Afficher l'erreur de champs vide si la valeur encoyée est une chaîne vide
        $typeId = intval($typeId);

        return $this->getProjectGrantService()->getActivityTypeById($typeId);
    }