Require Stripe validation to put event online, disable button and block route
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -407,6 +407,12 @@ class AccountController extends AbstractController
|
||||
throw $this->createAccessDeniedException();
|
||||
}
|
||||
|
||||
if (!$event->isOnline() && (!$user->isStripeChargesEnabled() || !$user->isStripePayoutsEnabled())) {
|
||||
$this->addFlash('error', 'Configuration Stripe requise pour mettre un evenement en ligne.');
|
||||
|
||||
return $this->redirectToRoute('app_account_edit_event', ['id' => $event->getId()]);
|
||||
}
|
||||
|
||||
$event->setIsOnline(!$event->isOnline());
|
||||
$em->flush();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user