Merge pull request #10987 from appwrite/fix-auth

Fix auth calls
This commit is contained in:
Jake Barnby 2025-12-18 12:56:58 +00:00 committed by GitHub
commit 1b6d51a116
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1034,7 +1034,8 @@ App::init()
->inject('dbForPlatform')
->inject('queueForCertificates')
->inject('platform')
->action(function (Request $request, Document $console, Database $dbForPlatform, Certificate $queueForCertificates, array $platform) {
->inject('authorization')
->action(function (Request $request, Document $console, Database $dbForPlatform, Certificate $queueForCertificates, array $platform, Authorization $authorization) {
$hostname = $request->getHostname();
$cache = Config::getParam('hostnames', []);
$platformHostnames = $platform['hostnames'] ?? [];
@ -1065,7 +1066,7 @@ App::init()
}
// 4. Check/create rule (requires DB access)
Authorization::disable();
$authorization->disable();
try {
// TODO: (@Meldiron) Remove after 1.7.x migration
$isMd5 = System::getEnv('_APP_RULES_FORMAT') === 'md5';
@ -1121,7 +1122,7 @@ App::init()
} finally {
$cache[$domain->get()] = true;
Config::setParam('hostnames', $cache);
Authorization::reset();
$authorization->reset();
}
});