Skip to content

Commit

Permalink
allow people with the write access policy to delete governing documen…
Browse files Browse the repository at this point in the history
…ts (#606)
  • Loading branch information
lego-eden authored Nov 26, 2024
1 parent f2281c2 commit 4f50a7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/database/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ model ExpoToken {

/// @@allow('create', has(auth().policies, 'governing_document:write'))
/// @@allow('read', has(auth().policies, 'governing_document:read'))
/// @@allow('delete', has(auth().policies, 'governing_document:write'))
/// @@deny('read', deletedAt != null)
/// @@allow('update', has(auth().policies, 'governing_document:write'))
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
Expand Down
1 change: 1 addition & 0 deletions src/database/schema.zmodel
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ model Document {

@@allow("create", has(auth().policies, "governing_document:write"))
@@allow("read", has(auth().policies, "governing_document:read"))
@@allow("delete", has(auth().policies, "governing_document:write"))
@@deny("read", deletedAt != null)
@@allow("update", has(auth().policies, "governing_document:write"))
@@map("documents")
Expand Down

0 comments on commit 4f50a7c

Please sign in to comment.