Commit 7c1ab827 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Merge branch 'spartan-switch-validator' of git.unicaen.fr:open-source/oscar...

Merge branch 'spartan-switch-validator' of git.unicaen.fr:open-source/oscar into spartan-switch-validator
parents 7137e43f 464b05b6
Loading
Loading
Loading
Loading
Loading
+6 −12
Changes for module/Oscar/src/Oscar/Controller/PersonController.php: 6 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -294,12 +294,9 @@ class PersonController extends AbstractOscarController implements UsePersonServi
            $allow = true;
            $justXHR = false;
        } else {
            $allow = $this->getOscarUserContextService()->hasOneOfPrivilegesInAnyRoles([
                Privileges::ACTIVITY_PERSON_MANAGE,
                Privileges::PROJECT_PERSON_MANAGE,
                Privileges::ORGANIZATION_EDIT,
                Privileges::ACTIVITY_INDEX,
            ]);
            $allow = $this->getOscarUserContextService()->hasOneOfPrivilegesInAnyRoles(
                [Privileges::ACTIVITY_PERSON_MANAGE, Privileges::PROJECT_PERSON_MANAGE, Privileges::ORGANIZATION_EDIT]
            );
        }

        if (!$allow) {
@@ -661,7 +658,6 @@ class PersonController extends AbstractOscarController implements UsePersonServi
        if ($this->isAjax()) {
            $action = $this->params()->fromQuery('a');


            switch ($action) {
                // Remplacement
                case 'replace' :
@@ -712,11 +708,11 @@ class PersonController extends AbstractOscarController implements UsePersonServi
                                $person->setCustomSettingsObj($custom);
                                $this->getEntityManager()->flush($person);
                                $this->getLoggerService()->info(print_r($custom, true));

                            }

                        } catch (\Exception $e) {
                            return $this->getResponseInternalError("Impossible d'enregistrer les paramètres : " . $e->getMessage());
                            return $this->getResponseInternalError(
                                "Impossible d'enregistrer les paramètres : " . $e->getMessage()
                            );
                        }
                        return $this->getResponseOk();
                    }
@@ -892,7 +888,6 @@ class PersonController extends AbstractOscarController implements UsePersonServi
            'validations' => $validations,
            'authentification' => $auth,
            'auth' => $auth,
            'affectations' => $this->getPersonService()->getPersonAffectationsArray($person),
            'allowTimesheet' => $allowTimesheet,
            'projects' => new UnicaenDoctrinePaginator($this->getProjectService()->getProjectUser($person->getId()), $page),
            'activities' => $this->getProjectGrantService()->personActivitiesWithoutProject($person->getId()),
@@ -1092,7 +1087,6 @@ class PersonController extends AbstractOscarController implements UsePersonServi
            $personConnector = array_keys($connectors);



            $form->setConnectors($personConnector);
        } catch (\Exception $e) {