From 24614f1fe9f376f7f85795d5977d312419b99b41 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 7 Aug 2021 15:46:22 +0300 Subject: [PATCH] Simplified Permission handling --- app/controllers/general.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 91b96edb83..fa8f7b9cb5 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -53,7 +53,6 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons 'domain' => $domain->get(), ]); $certificate = $dbForConsole->createDocument('certificates', $certificate); - Authorization::enable(); Console::info('Issuing a TLS certificate for the master domain (' . $domain->get() . ') in a few seconds...'); @@ -63,10 +62,11 @@ App::init(function ($utopia, $request, $response, $console, $project, $dbForCons 'validateTarget' => false, 'validateCNAME' => false, ]); - } else { - Authorization::enable(); // ensure authorization is reenabled } + $domains[$domain->get()] = true; + + Authorization::reset(); // ensure authorization is re-enabled } Config::setParam('domains', $domains); }