-
- Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
VScode throws an inline error here.
| @@allow('all', auth() == author) |
The solution is to define the @@auth attribute on the User
datasource db { provider = 'sqlite' url = 'file:.dev.db' } model User { id Int @id @default(autoincrement()) posts Post[] @@auth } model Post { id Int @id @default(autoincrement()) title String author User @relation(fields: [authorId], references: [id]) authorId Int @@allow('all', auth() == author) } I will hold off submitting a PR since this is only an issue in the VScode plugin, but it could throw off any users trying to follow the docs.
Metadata
Metadata
Assignees
Labels
No labels