Skip to content

Commit

Permalink
update to latest zenstack
Browse files Browse the repository at this point in the history
  • Loading branch information
ymc9 committed Nov 17, 2023
1 parent 5d9529e commit 934c47e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
70 changes: 35 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@next-auth/prisma-adapter": "^1.0.6",
"@prisma/client": "^5.0.0",
"@vercel/analytics": "^1.0.1",
"@zenstackhq/runtime": "1.3.0",
"@zenstackhq/server": "1.3.0",
"@zenstackhq/runtime": "1.3.1",
"@zenstackhq/server": "1.3.1",
"babel-plugin-superjson-next": "^0.4.5",
"bcryptjs": "^2.4.3",
"daisyui": "^2.31.0",
Expand All @@ -44,14 +44,14 @@
"@types/node": "^14.17.3",
"@types/react": "^18.2.22",
"@types/react-dom": "18.0.6",
"@zenstackhq/swr": "1.3.0",
"@zenstackhq/swr": "1.3.1",
"autoprefixer": "^10.4.12",
"eslint": "^7.19.0",
"eslint-config-next": "12.3.1",
"postcss": "^8.4.16",
"prisma": "^5.0.0",
"tailwindcss": "^3.1.8",
"typescript": "^5.1.6",
"zenstack": "1.3.0"
"zenstack": "1.3.1"
}
}
18 changes: 9 additions & 9 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ enum SpaceUserRole {

/// @@deny('all', auth() == null)
/// @@allow('create', true)
/// @@allow('read', members ? [user == auth()])
/// @@allow('update,delete', members ? [user == auth() && role == ADMIN])
/// @@allow('read', members?[user == auth()])
/// @@allow('update,delete', members?[user == auth() && role == ADMIN])
model Space {
id String @id() @default(uuid())
createdAt DateTime @default(now())
Expand All @@ -34,8 +34,8 @@ model Space {
}

/// @@deny('all', auth() == null)
/// @@allow('create,update,delete', space.members ? [user == auth() && role == ADMIN])
/// @@allow('read', space.members ? [user == auth()])
/// @@allow('create,update,delete', space.members?[user == auth() && role == ADMIN])
/// @@allow('read', space.members?[user == auth()])
model SpaceUser {
id String @id() @default(uuid())
createdAt DateTime @default(now())
Expand All @@ -50,7 +50,7 @@ model SpaceUser {
}

/// @@allow('create', true)
/// @@allow('read', spaces ? [space.members ? [user == auth()]])
/// @@allow('read', spaces?[space.members?[user == auth()]])
/// @@allow('all', auth() == this)
model User {
id String @id() @default(uuid())
Expand All @@ -72,9 +72,9 @@ model User {
}

/// @@deny('all', auth() == null)
/// @@allow('read', owner == auth() || (space.members ? [user == auth()] && !private))
/// @@allow('create', owner == auth() && space.members ? [user == auth()])
/// @@allow('update', owner == auth() && space.members ? [user == auth()] && future().owner == owner)
/// @@allow('read', owner == auth() || (space.members?[user == auth()] && !private))
/// @@allow('create', owner == auth() && space.members?[user == auth()])
/// @@allow('update', owner == auth() && space.members?[user == auth()] && future().owner == owner)
/// @@allow('delete', owner == auth())
model List {
id String @id() @default(uuid())
Expand All @@ -92,7 +92,7 @@ model List {

/// @@deny('all', auth() == null)
/// @@allow('all', list.owner == auth())
/// @@allow('all', list.space.members ? [user == auth()] && !list.private)
/// @@allow('all', list.space.members?[user == auth()] && !list.private)
/// @@deny('update', future().owner != owner)
model Todo {
id String @id() @default(uuid())
Expand Down

1 comment on commit 934c47e

@vercel
Copy link

@vercel vercel bot commented on 934c47e Nov 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

todo-demo – ./

todo-demo-git-main-zenstack.vercel.app
zenstack-todo.vercel.app
todo-demo-zenstack.vercel.app

Please sign in to comment.