1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

fix: collections for mfa

This commit is contained in:
Torsten Dittmann 2024-01-08 13:22:33 +01:00
parent e4439b2ee2
commit 7c66481406
3 changed files with 12 additions and 1343 deletions

File diff suppressed because it is too large Load diff

View file

@ -9,8 +9,6 @@ use Utopia\Logger\Logger;
use Utopia\Logger\Log;
use Utopia\Logger\Log\User;
use Swoole\Http\Request as SwooleRequest;
use Utopia\Cache\Cache;
use Utopia\Pools\Group;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\View;
@ -217,7 +215,6 @@ App::init()
/*
* Appwrite Router
*/
$host = $request->getHostname() ?? '';
$mainDomain = App::getEnv('_APP_DOMAIN', '');
// Only run Router when external domain
@ -568,7 +565,6 @@ App::init()
if ($mode !== APP_MODE_ADMIN && $project->getId() !== 'console') {
$minFactors = $project->getAttribute('minFactors') ?? 2;
var_dump($minFactors);
if (!in_array('mfa', $route->getGroups())) {
if ($session && \count($session->getAttribute('factors')) < $minFactors) {
throw new AppwriteException(AppwriteException::USER_MORE_FACTORS_REQUIRED);

View file

@ -103,6 +103,7 @@ use Appwrite\Utopia\Response\Model\MigrationFirebaseProject;
use Appwrite\Utopia\Response\Model\MigrationReport;
// Keep last
use Appwrite\Utopia\Response\Model\Mock;
use Appwrite\Utopia\Response\Model\Rule;
/**
* @method int getStatusCode()
@ -447,8 +448,6 @@ class Response extends SwooleResponse
->setModel(new Migration())
->setModel(new MigrationReport())
->setModel(new MigrationFirebaseProject())
// Verification
// Recovery
// Tests (keep last)
->setModel(new Mock());