This commit is contained in:
Eldad Fux
2025-10-13 23:48:50 +01:00
parent ff06920e24
commit 3e58014dbd
3 changed files with 1 additions and 57 deletions
-18
View File
@@ -1,22 +1,4 @@
<?php
return [
'0-mail.com' => 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,
];
-38
View File
@@ -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'])
+1 -1
View File
@@ -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.
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.