Skip to content

docs: add NestJS tutorial #267

New issue

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

Merged
merged 4 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/quick-start/_access-policy.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
:::tip
:::info

By default, all operations are denied for a model. You can use `@@allow` attribute to open up some permissions.
By default, all operations are denied for a model. You can use the `@@allow` attribute to open up some permissions.

`@@allow` takes two parameters, the first is operation: create/read/update/delete. You can use a comma separated string to pass multiple operations, or use 'all' to abbreviate all operations. The second parameter is a boolean expression verdicting if the rule should be activated.
`@@allow` takes two parameters, the first is operation: create/read/update/delete. You can use a comma separated string to pass multiple operations, or use 'all' to abbreviate all operations. The second parameter is a boolean expression that verdicts if the rule should be activated.

Similarly, `@@deny` can be used to explicitly turn off some operations. It has the same syntax as `@@allow` but the opposite effect.

Whether an operation is permitted is determined as the follows:
Whether an operation is permitted is determined as follows:

1. If any `@@deny` rule evaluates to true, it's denied.
1. If any `@@allow` rule evaluates to true, it's allowed.
1. Otherwise, it's denied.
2. If any `@@allow` rule evaluates to true, it's allowed.
3. Otherwise, it's denied.

Check out [Understanding Access Policies](/docs/the-complete-guide/part1/access-policy) for more details.
:::
2 changes: 1 addition & 1 deletion docs/quick-start/_zenstack-init-tips.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:::tip
:::info

The command installs a few NPM dependencies. If the project already has a Prisma schema at `prisma/schema.prisma`, it's copied over to `schema.zmodel`. Otherwise, a sample `schema.zmodel` file is created.

Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start/backend.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Steps for using ZenStack only in backend development.
sidebar_position: 7
sidebar_position: 8
---

import InitTips from './_zenstack-init-tips.md';
Expand Down
Loading