Skip to content

Commit 418d7fe

Browse files
Docs: Update permissions
1 parent e623e17 commit 418d7fe

File tree

8 files changed

+60
-301
lines changed

8 files changed

+60
-301
lines changed

docs/how-to-build-with-promptql/_boilerplateDx.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ It is highly recommended to provide extra natural language descriptions of the r
3333
can better understand your data and create appropriate query plans.
3434

3535
The description field can be added to `Model`, `Command` and `Relationship` metadata objects to provide semantic
36-
context. See more about [semantic information here](/metadata/guides/semantic-information.mdx).
36+
context.
3737

3838
### Step 7. Create a new build
3939

docs/metadata/guides/data-modeling-workflows.mdx

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/metadata/guides/index.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
sidebar_position: 1
3+
sidebar_label: Guides
4+
description: "See step-by-step guides for working with your semantic metadata layer."
5+
keywords:
6+
- hasura ddn
7+
- semantic metadata
8+
---
9+
10+
# Guides
11+
12+
## Introduction
13+
14+
In this section, you'll find step-by-step examples of how to work with your semantic metadata layer.
15+
16+
## Learn more
17+
18+
- [Iterate on your data model](/metadata/guides/iterate.mdx)
19+
- [Recast types at the metadata layer](/metadata/guides/typecasting.mdx)

docs/metadata/guides/iterate.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ ddn relationship add my_connector "*"
8686
It's highly recommended to provide extra natural language descriptions of the resources in your project so that the
8787
PromptQL can better understand your data and create appropriate query plans.
8888

89-
The description field can be added to `Model`, `Command` and `Relationship` metadata elements to provide semantic
90-
context. See more about [semantic information here](/metadata/guides/semantic-information.mdx).
89+
The description field can be added to `Model`, `Command` and `Relationship` metadata objects to provide semantic
90+
context.
9191

9292
#### Rebuild
9393

docs/metadata/guides/semantic-information.mdx

Lines changed: 0 additions & 248 deletions
This file was deleted.

docs/metadata/permissions.mdx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ toc_max_heading_level: 4
1111
sidebar_class_name: sidebar-divider-bottom
1212
---
1313

14-
# Permissions Protect Data
14+
# Protect Data
1515

1616
## Introduction
1717

18-
Permissions keep data secure by allowing you to control what data can be accessed through PromptQL conversations by
18+
**Permissions** keep data secure by allowing you to control what data can be accessed through PromptQL conversations by
1919
which user roles. This ensures that when users talk to their data using PromptQL, they only see the information they're
2020
authorized to access.
2121

@@ -33,19 +33,14 @@ the `admin` role by default.
3333

3434
All other permissions for all other user roles must be added manually.
3535

36-
## Create permissions
36+
## Create a permission
3737

3838
### Row access
3939

4040
You can create a `ModelPermission` object to implement row-level security and restrict which rows a user can access
4141
through PromptQL.
4242

43-
For example, to only allow users to access their own records in the `Users` table when talking to their data through
44-
PromptQL:
45-
46-
```yaml title=""
47-
---
48-
# e.g., Users.hml
43+
```yaml title="For example, to only allow users to access their own records in the Users table when talking to their data through PromptQL:"
4944
kind: ModelPermissions
5045
version: v1
5146
definition:
@@ -77,8 +72,6 @@ To restrict which fields can be accessed through PromptQL conversations, you can
7772
Below, the user role can only access the `name` field, not the `id` field which the admin role can.
7873

7974
```yaml title="The user role can only access their name field:"
80-
# e.g., Users.hml
81-
---
8275
kind: TypePermissions
8376
version: v1
8477
definition:
@@ -104,8 +97,6 @@ To determine which commands can be executed by which roles when interacting with
10497
`CommandPermission` object.
10598

10699
```yaml title="In this example, we'll make it so a user can update their own record:"
107-
# e.g., UpdateUsersById.hml
108-
---
109100
kind: CommandPermissions
110101
version: v1
111102
definition:
@@ -126,20 +117,22 @@ definition:
126117
When a user asks PromptQL to update their information, these permissions ensure that they can only modify their own
127118
records.
128119

129-
## Update permissions
120+
## Update a permission
130121

131122
Since all permissions are stored in metadata, you can use your text editor to find and update them easily.
132123

133124
For example, to check everything which the `user` role can access when talking to data through PromptQL, search for
134125
`- role: user` and analyze the results.
135126

136-
## Deleting permissions
127+
## Delete a permission
137128

138129
If you no longer need a role, find all mentions of it in your metadata and remove them all.
139130

140131
If you no longer need a particular permission, simply remove it from the relevant `ModelPermissions`, `TypePermissions`,
141132
or `CommandPermissions` object.
142133

143-
## Reference
134+
## Next steps
144135

145-
You can learn more about permissions in the metadata reference [docs](/reference/metadata-reference/permissions.mdx).
136+
- Now that you've been through the major building blocks of your semantic metadata layer, check out the
137+
[business logic section](/business-logic/index.mdx) to learn how to place more tools in PromptQL's toolbox.
138+
- You can learn more about permissions in the metadata reference [docs](/reference/metadata-reference/permissions.mdx).

0 commit comments

Comments
 (0)