|
@@ -64,7 +64,7 @@ discard block |
|
|
block discarded – undo |
|
64
|
64
|
return new JsonResponse([]); |
|
65
|
65
|
} |
|
66
|
66
|
$retour = array_map( |
|
67
|
|
- function ($element) use ($manager, $options) { |
|
|
67
|
+ function($element) use ($manager, $options) { |
|
68
|
68
|
return $manager->toArray($element, $this->getFields($options['fields'])); |
|
69
|
69
|
}, |
|
70
|
70
|
$resultSets |
|
@@ -184,7 +184,7 @@ discard block |
|
|
block discarded – undo |
|
184
|
184
|
return new JsonResponse(["payload" => $this->translate("utilisateur.entity.not_found", "utilisateur")], 404); |
|
185
|
185
|
} |
|
186
|
186
|
// Un utilisateur ne peut modifier un autre utilisateur sauf si ce dernier est un super admin. |
|
187
|
|
- if($this->getUser()->getId() != $utilisateur->getId() && !$this->isGranted("ROLE_SUPER_ADMIN")){ |
|
|
187
|
+ if ($this->getUser()->getId() != $utilisateur->getId() && !$this->isGranted("ROLE_SUPER_ADMIN")) { |
|
188
|
188
|
return new JsonResponse(["payload" => $this->translate("utilisateur.entity.not_updated_is_not_admin", "utilisateur")], 400); |
|
189
|
189
|
} |
|
190
|
190
|
$manager->beginTransaction(); |
Please login to merge, or discard this patch.