From 7398374f21a1a3e2a57d69069a17af316197cd5f Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 18 Jun 2024 15:57:14 +0530 Subject: [PATCH] removed background job and update domains code --- appinfo/info.xml | 2 +- lib/BackgroundJob/BlacklistedDomainsJob.php | 35 --------------------- lib/Command/UpdateBlacklistedDomains.php | 30 ------------------ lib/Service/UserService.php | 5 --- 4 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 lib/BackgroundJob/BlacklistedDomainsJob.php delete mode 100644 lib/Command/UpdateBlacklistedDomains.php diff --git a/appinfo/info.xml b/appinfo/info.xml index 9d095387..e6f7fd12 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -10,7 +10,7 @@ - 6.0.3 + 6.0.4 agpl Murena SAS EcloudAccounts diff --git a/lib/BackgroundJob/BlacklistedDomainsJob.php b/lib/BackgroundJob/BlacklistedDomainsJob.php deleted file mode 100644 index cf776076..00000000 --- a/lib/BackgroundJob/BlacklistedDomainsJob.php +++ /dev/null @@ -1,35 +0,0 @@ -setInterval(self::INTERVAL_PERIOD); - $this->setTimeSensitivity(self::TIME_INSENSITIVE); - $this->timeFactory = $timeFactory; - $this->userService = $userService; - $this->logger = $logger; - } - - protected function run($argument): void { - try { - $this->userService->updateBlacklistedDomains(); - } catch (\Exception $e) { - $this->logger->logException('Error updating blacklisted domains for account creation', ['exception' => $e]); - return; - } - } -} diff --git a/lib/Command/UpdateBlacklistedDomains.php b/lib/Command/UpdateBlacklistedDomains.php deleted file mode 100644 index 8b51a28a..00000000 --- a/lib/Command/UpdateBlacklistedDomains.php +++ /dev/null @@ -1,30 +0,0 @@ -userService = $userService; - } - - protected function configure() { - $this->setName(Application::APP_ID.':update-blacklisted-domains')->setDescription('Update blacklisted domains'); - } - - protected function execute(InputInterface $input, OutputInterface $output): int { - $this->userService->updateBlacklistedDomains(); - $output->writeln('Updated blacklisted domains for creation.'); - return 1; - } -} diff --git a/lib/Service/UserService.php b/lib/Service/UserService.php index ecf5bddd..1b8d5f46 100644 --- a/lib/Service/UserService.php +++ b/lib/Service/UserService.php @@ -585,9 +585,4 @@ class UserService { private function getDefaultQuota() { return $this->config->getSystemValueInt('default_quota_in_megabytes', 1024); } - public function updateBlacklistedDomains() { - $blacklisted_domain_url = 'https://raw.githubusercontent.com/disposable/disposable-email-domains/master/domains.json'; - $json_data = file_get_contents($blacklisted_domain_url); - $this->config->setAppValue(Application::APP_ID, 'blacklisted_domains', $json_data); - } } -- GitLab