We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model User { id Int @id @default(autoincrement()) name String? admin Boolean @default(false) companiesWorkedFor Company[] username String @unique @allow("all", auth() == this) @allow('read', companiesWorkedFor?[owner == auth()]) @allow("all", auth().admin) } model Company { id Int @id @default(autoincrement()) name String? owner User @relation(fields: [ownerId], references: [id]) ownerId Int }
After running zenstack generate, it will shows the below error:
zenstack generate
node_modules/.zenstack/policy.ts:15:90 - error TS1005: ':' expected. 15 input, ['id']) || (input?.companiesWorkedFor ? (input?.owner == user)) || (user?.admin ?? null))
It misses the : null in the collection ex
: null
The text was updated successfully, but these errors were encountered:
No branches or pull requests
After running
zenstack generate
, it will shows the below error:It misses the
: null
in the collection exThe text was updated successfully, but these errors were encountered: