diff --git a/app/config/domains/disposable-emails.php b/app/config/domains/disposable-emails.php index b5516470d8..b62512838d 100644 --- a/app/config/domains/disposable-emails.php +++ b/app/config/domains/disposable-emails.php @@ -1,22 +1,4 @@ true, - '027168.com' => true, - '062e.com' => true, - '0815.ru' => true, - '0815.su' => true, - '0845.ru' => true, - '0box.eu' => true, - '0cd.cn' => true, - '10minutemail.com' => true, - 'tempmail.org' => true, - 'guerrillamail.com' => true, - 'mailinator.com' => true, - 'temp-mail.org' => true, - 'throwaway.email' => true, - 'yopmail.com' => true, - 'maildrop.cc' => true, - 'getnada.com' => true, - 'tempail.com' => true, ]; diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index c60de52bfb..aafe867fe2 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1022,44 +1022,6 @@ App::patch('/v1/projects/:projectId/auth/personal-data') $response->dynamic($project, Response::MODEL_PROJECT); }); -App::patch('/v1/projects/:projectId/auth/disposable-emails') - ->desc('Update disposable emails check') - ->groups(['api', 'projects']) - ->label('scope', 'projects.write') - ->label('sdk', new Method( - namespace: 'projects', - group: 'auth', - name: 'updateDisposableEmails', - description: '/docs/references/projects/update-disposable-emails.md', - auth: [AuthType::ADMIN], - responses: [ - new SDKResponse( - code: Response::STATUS_CODE_OK, - model: Response::MODEL_PROJECT, - ) - ] - )) - ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('enabled', false, new Boolean(false), 'Set whether or not to block disposable email addresses. Default is false.') - ->inject('response') - ->inject('dbForPlatform') - ->action(function (string $projectId, bool $enabled, Response $response, Database $dbForPlatform) { - - $project = $dbForPlatform->getDocument('projects', $projectId); - - if ($project->isEmpty()) { - throw new Exception(Exception::PROJECT_NOT_FOUND); - } - - $auths = $project->getAttribute('auths', []); - $auths['disposableEmails'] = $enabled; - - $dbForPlatform->updateDocument('projects', $project->getId(), $project - ->setAttribute('auths', $auths)); - - $response->dynamic($project, Response::MODEL_PROJECT); - }); - App::patch('/v1/projects/:projectId/auth/max-sessions') ->desc('Update project user sessions limit') ->groups(['api', 'projects']) diff --git a/app/init/configs.php b/app/init/configs.php index 1ec4d60480..81ef2eb583 100644 --- a/app/init/configs.php +++ b/app/init/configs.php @@ -40,4 +40,4 @@ Config::load('storage-outputs', __DIR__ . '/../config/storage/outputs.php'); Config::load('specifications', __DIR__ . '/../config/specifications.php'); Config::load('templates-function', __DIR__ . '/../config/templates/function.php'); Config::load('templates-site', __DIR__ . '/../config/templates/site.php'); -Config::load('disposableEmails', __DIR__ . '/../config/domains/disposable-emails.php'); // (eldad) following cloud camelCase format. Wish we could be consistent with the rest of the codebase. \ No newline at end of file +Config::load('disposableEmails', __DIR__ . '/../config/domains/disposable-emails.php'); // (eldad) following cloud camelCase format. Wish we could be consistent with the rest of the codebase.