Skip to content

Commit

Permalink
fix(database): cannot create documents with only scope
Browse files Browse the repository at this point in the history
  • Loading branch information
kkopanidis committed May 21, 2024
1 parent 369958f commit 396984b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/database/src/adapters/SchemaAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export abstract class SchemaAdapter<T> {
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}`;
Expand Down

0 comments on commit 396984b

Please sign in to comment.