-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Securité] Revoir les actions sur les utilisateurs et partenaires #2297
Conversation
$this->denyAccessUnlessGranted('USER_CREATE', $partner); | ||
$data = $request->get('user_create'); | ||
if (!$this->isCsrfTokenValid('partner_user_create', $request->request->get('_token'))) { | ||
$this->addFlash('error', 'Token invalide.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mettre un message d'erreur plus explicite et dire quoi faire
Une erreur est survenue, merci d'actualiser la page et réessayer ?
$this->addFlash('success', 'L\'utilisateur a bien été supprimé.'); | ||
$userId = $request->request->get('user_id'); | ||
if (!$this->isCsrfTokenValid('partner_user_delete', $request->request->get('_token'))) { | ||
$this->addFlash('error', 'Token invalide.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Une erreur est survenue, merci d'actualiser la page et réessayer ?
Un dernier petit souci @numew Je suis resp territoire, j'ai un super admin dans un partenaire (ce qui n'est pas sensé arriver, mais qui est possible techniquement), je ne peux plus l'éditer (cool), mais je peux toujours le transférer et le supprimer : |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests ok, une dernière petite remarque sur le code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK tests et lecture
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lecture et test OK
Ticket
#2247
Description
Tests