diff --git a/modules/database/src/adapters/SchemaAdapter.ts b/modules/database/src/adapters/SchemaAdapter.ts index 72fd2f064..8e61439b6 100644 --- a/modules/database/src/adapters/SchemaAdapter.ts +++ b/modules/database/src/adapters/SchemaAdapter.ts @@ -197,7 +197,7 @@ export abstract class SchemaAdapter { options?: { userId?: string; scope?: string }, ) { if (!this.authzEnabled) return; - if (!options || (!options?.userId && options?.scope)) { + if (!options || (!options?.userId && !options?.scope)) { return; } const subject = options.scope ?? `User:${options.userId}`;