Merge pull request #11262 from appwrite/chore-remove-auth-skip-from-workers

chore: remove auth skip from workers
This commit is contained in:
Luke B. Silver
2026-02-06 10:13:11 +00:00
committed by GitHub
2 changed files with 7 additions and 7 deletions
@@ -153,11 +153,11 @@ class Certificates extends Action
): void {
// Get rule
$rule = System::getEnv('_APP_RULES_FORMAT') === 'md5'
? $authorization->skip(fn () => $dbForPlatform->getDocument('rules', md5($domain->get())))
: $authorization->skip(fn () => $dbForPlatform->findOne('rules', [
? $dbForPlatform->getDocument('rules', md5($domain->get()))
: $dbForPlatform->findOne('rules', [
Query::equal('domain', [$domain->get()]),
Query::limit(1),
]));
]);
// Skip if rule is not desired state (created but not verified yet).
if ($rule->getAttribute('status', '') !== RULE_STATUS_CREATED) {
@@ -269,11 +269,11 @@ class Certificates extends Action
// Get rule document for domain
// TODO: (@Meldiron) Remove after 1.7.x migration
$rule = System::getEnv('_APP_RULES_FORMAT') === 'md5'
? $authorization->skip(fn () => $dbForPlatform->getDocument('rules', md5($domain->get())))
: $authorization->skip(fn () => $dbForPlatform->findOne('rules', [
? $dbForPlatform->getDocument('rules', md5($domain->get()))
: $dbForPlatform->findOne('rules', [
Query::equal('domain', [$domain->get()]),
Query::limit(1),
]));
]);
// Rule not found (or) not in the expected state
if ($rule->isEmpty() || !\in_array($rule->getAttribute('status'), [RULE_STATUS_CERTIFICATE_GENERATING, RULE_STATUS_VERIFIED])) {
+1 -1
View File
@@ -493,7 +493,7 @@ class Migrations extends Action
throw new \Exception('User ' . $userInternalId . ' not found');
}
$bucket = $authorization->skip(fn () => $this->dbForPlatform->getDocument('buckets', $bucketId));
$bucket = $this->dbForPlatform->getDocument('buckets', $bucketId);
if ($bucket->isEmpty()) {
throw new \Exception('Bucket not found');
}