Skip to content

Commit 8000a8e

Browse files
authored
doc: v3 access policy and input validation (#495)
* WIP: policy docs * update * update * fix broken links * update * update
1 parent c57a1af commit 8000a8e

File tree

27 files changed

+1026
-37
lines changed

27 files changed

+1026
-37
lines changed

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@
1616
[submodule "code-repos/zenstackhq/v3-doc-orm-polymorphism"]
1717
path = code-repos/zenstackhq/v3-doc-orm-polymorphism
1818
url = https://github.com/zenstackhq/v3-doc-orm-polymorphism.git
19+
[submodule "code-repos/zenstackhq/v3-doc-orm-validation"]
20+
path = code-repos/zenstackhq/v3-doc-orm-validation
21+
url = https://github.com/zenstackhq/v3-doc-orm-validation.git
22+
[submodule "code-repos/zenstackhq/v3-doc-orm-policy"]
23+
path = code-repos/zenstackhq/v3-doc-orm-policy
24+
url = https://github.com/zenstackhq/v3-doc-orm-policy.git

README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Website
22

3-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
3+
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.
44

55
### Installation
66

@@ -23,19 +23,3 @@ $ pnpm build
2323
```
2424

2525
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26-
27-
### Deployment
28-
29-
Using SSH:
30-
31-
```
32-
$ USE_SSH=true pnpm deploy
33-
```
34-
35-
Not using SSH:
36-
37-
```
38-
$ GIT_USER=<Your GitHub username> pnpm deploy
39-
```
40-
41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

blog/better-auth/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ type Auth {
434434
}
435435
```
436436
437-
Now, we're ready to write the policy rules. You can find more information about access polices [here](https://zenstack.dev/docs/the-complete-guide/part1/access-policy/).
437+
Now, we're ready to write the policy rules. You can find more information about access policies [here](https://zenstack.dev/docs/the-complete-guide/part1/access-policy/).
438438
439439
#### 1. Tenant segregation
440440
Submodule v3-doc-orm-policy added at f4b864b
Submodule v3-doc-orm-validation added at c864393

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The short answer is it works in most cases. Please refer to [this guide](./guide
6060

6161
### Does the order in which access policies are defined matter?
6262

63-
No. See [here](./the-complete-guide/part1/4-access-policy/4.1-model-level.md#evaluation-of-model-level-policies) for how access polices are evaluated.
63+
No. See [here](./the-complete-guide/part1/4-access-policy/4.1-model-level.md#evaluation-of-model-level-policies) for how access policies are evaluated.
6464

6565
### Is Prisma's new "prisma-client" generator supported?
6666

src/components/StackBlitzGithub.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import GithubCodeBlock from './GithubCodeBlock';
44

55
interface StackBlitzGithubProps {
66
repoPath: string;
7-
openFile?: string;
7+
openFile?: string | string[];
88
codeFiles?: string[];
99
startScript?: string;
1010
}
@@ -15,14 +15,16 @@ const StackBlitzGithub: React.FC<StackBlitzGithubProps> = ({
1515
codeFiles: plainCodeFiles = undefined,
1616
startScript,
1717
}) => {
18+
const openFiles = Array.isArray(openFile) ? openFile : openFile ? openFile.split(',') : [];
19+
1820
const options = {
19-
openFile,
21+
openFile: openFiles ? openFiles.join(',') : undefined,
2022
view: 'editor',
2123
startScript,
2224
} as const;
2325

2426
if (!plainCodeFiles) {
25-
plainCodeFiles = [openFile];
27+
plainCodeFiles = [...openFiles];
2628
}
2729

2830
return (

versioned_docs/version-3.x/modeling/relation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ model Mentorship {
221221
}
222222
```
223223

224-
## Referential Actions
224+
## Referential Action
225225

226226
When defining a relation, you can use referential action to control what happens when one side of a relation is updated or deleted by setting the `onDelete` and `onUpdate` parameters in the `@relation` attribute.
227227

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# Field-Level Policies 🚧
6+
7+
Coming soon.

0 commit comments

Comments
 (0)