chore: verify DSN after the limit verification

This commit is contained in:
Maël Gangloff 2024-08-18 18:30:01 +02:00
parent e1e54d9e26
commit 6a7091ac00
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629

View File

@ -94,8 +94,6 @@ class WatchListController extends AbstractController
$user = $this->getUser();
$watchList->setUser($user);
$this->verifyWebhookDSN($watchList);
/*
* In the limited version, we do not want a user to be able to register the same domain more than once in their watchlists.
* This policy guarantees the equal probability of obtaining a domain name if it is requested by several users.
@ -141,6 +139,8 @@ class WatchListController extends AbstractController
}
}
$this->verifyWebhookDSN($watchList);
$user = $this->getUser();
$this->logger->info('User {username} registers a Watchlist ({token}).', [
'username' => $user->getUserIdentifier(),
@ -189,8 +189,6 @@ class WatchListController extends AbstractController
$user = $this->getUser();
$watchList->setUser($user);
$this->verifyWebhookDSN($watchList);
if ($this->getParameter('limited_features')) {
if ($watchList->getDomains()->count() > (int) $this->getParameter('limit_max_watchlist_domains')) {
$this->logger->notice('User {username} tried to update a Watchlist. The maximum number of domains has been reached for this Watchlist', [
@ -227,6 +225,8 @@ class WatchListController extends AbstractController
}
}
$this->verifyWebhookDSN($watchList);
$this->logger->info('User {username} updates a Watchlist ({token}).', [
'username' => $user->getUserIdentifier(),
'token' => $watchList->getToken(),