notification - grant access by key - temporarily disable email verification due to character escaping in email

This commit is contained in:
Julien Fastré 2022-04-14 01:36:01 +02:00
parent 124a6a58fc
commit 617473f6a5

View File

@ -171,7 +171,7 @@ class NotificationController extends AbstractController
throw new AccessDeniedHttpException('You must be authenticated and a user to create a notification');
}
foreach (['accessKey', 'email'] as $param) {
foreach (['accessKey'/*, 'email'*/] as $param) {
if (!$request->query->has($param)) {
throw new BadRequestHttpException("Missing {$param} parameter");
}
@ -181,10 +181,13 @@ class NotificationController extends AbstractController
throw new AccessDeniedHttpException('access key is invalid');
}
/*
desactivated due to escaped '&' in email links
if (!in_array($request->query->get('email'), $notification->getAddressesEmails(), true)) {
return (new Response('The email address is no more associated with this notification'))
->setStatusCode(Response::HTTP_FORBIDDEN);
}
*/
$notification->addAddressee($this->security->getUser());