Skip to content

Commit 1ed4bf6

Browse files
docs: update export related docs (#913)
* update export changelog * update roles with changes to export * update * update * update * update export * update * update environment policies * Update mintlify/security/database-permission/overview.mdx Co-authored-by: Copilot <[email protected]> * update * update * update * update changelog * update --------- Co-authored-by: Copilot <[email protected]>
1 parent 7ff575f commit 1ed4bf6

File tree

13 files changed

+72
-91
lines changed

13 files changed

+72
-91
lines changed

mintlify/administration/roles.mdx

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ Bytebase provides two types of roles:
2828

2929
**Project roles:**
3030
- `Project Owner` - Full control over project resources
31-
- `Project Developer` - Create and manage database changes
31+
- `Project Developer` - Create and manage database changes; create Export issues for one-time exports
3232
- `Project Releaser` - Approve and release changes
33-
- `SQL Editor User` - Query databases (formerly `Project Querier`)
34-
- `Project Exporter` - Export data
33+
- `SQL Editor User` (formerly `Project Querier`) - Query in SQL Editor; export results directly from the Editor
3534
- `Project Viewer` - Read-only access
3635

3736
#### Custom Roles
@@ -130,23 +129,22 @@ By default, the first registered user is granted the `Admin` role, all following
130129

131130
Any user can create project. By default, the project creator is granted the `Project Owner` role. `Workspace DBA` and `Workspace Admin` assume the `Project Owner` role for all projects.
132131

133-
| Project Permission | SQL Editor User | Project Exporter | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
134-
| ---------------------------- | --------------- | ---------------- | ----------------- | ------------- | ------------- | --------------- |
135-
| Change project role | | | | ✔️ | ✔️ | ✔️ |
136-
| Edit project | | | | ✔️ | ✔️ | ✔️ |
137-
| Archive project | | | | ✔️ | ✔️ | ✔️ |
138-
| Configure UI/GitOps workflow | | | | ✔️ | ✔️ | ✔️ |
132+
| Project Permission | SQL Editor User | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
133+
| ---------------------------- | --------------- | ----------------- | ------------- | ------------- | --------------- |
134+
| Change project role | | | ✔️ | ✔️ | ✔️ |
135+
| Edit project | | | ✔️ | ✔️ | ✔️ |
136+
| Archive project | | | ✔️ | ✔️ | ✔️ |
137+
| Configure UI/GitOps workflow | | | ✔️ | ✔️ | ✔️ |
139138

140139
### Database Permissions
141140

142141
Bytebase does not define database specific roles. Whether a user can perform certain action to the database is based on the user's Workspace role and the role of the project owning the database.
143142

144-
| Database Permission | SQL Editor User | Project Exporter | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
145-
| ------------------- | --------------- | ---------------- | ----------------- | ------------- | ------------- | --------------- |
146-
| Query | ✔️ | | | ✔️ | ✔️ | ✔️ |
147-
| Export | | ✔️ | | ✔️ | ✔️ | ✔️ |
148-
| Edit database label | | | | ✔️ | ✔️ | ✔️ |
149-
| Transfer database | | | | ✔️ | ✔️ | ✔️ |
143+
| Database Permission | SQL Editor User | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
144+
| ------------------- | --------------- | ----------------- | ------------- | ------------- | --------------- |
145+
| Query | ✔️ | | ✔️ | ✔️ | ✔️ |
146+
| Edit database label | | | ✔️ | ✔️ | ✔️ |
147+
| Transfer database | | | ✔️ | ✔️ | ✔️ |
150148

151149
### Sheet Permissions
152150

@@ -158,40 +156,40 @@ User can save sheets from [SQL Editor](/sql-editor/overview). A sheet always bel
158156

159157
#### Private Sheet
160158

161-
| Permission | Creator | SQL Editor User | Project Exporter | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
162-
| ---------- | ------- | --------------- | ---------------- | ----------------- | ------------- | ------------- | --------------- |
163-
| Star | ✔️ | | | | | | |
164-
| Read | ✔️ | | | | | | |
165-
| Write | ✔️ | | | | | | |
166-
| Delete | ✔️ | | | | | | |
159+
| Permission | Creator | SQL Editor User | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
160+
| ---------- | ------- | --------------- | ----------------- | ------------- | ------------- | --------------- |
161+
| Star | ✔️ | | | | | |
162+
| Read | ✔️ | | | | | |
163+
| Write | ✔️ | | | | | |
164+
| Delete | ✔️ | | | | | |
167165

168166
#### Project Sheet
169167

170-
| Permission | Creator | SQL Editor User | Project Exporter | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
171-
| ---------- | ------- | --------------- | ---------------- | ----------------- | ------------- | ------------- | --------------- |
172-
| Star | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
173-
| Read | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
174-
| Write | ✔️ | | | | ✔️ | ✔️ | ✔️ |
175-
| Delete | ✔️ | | | | ✔️ | ✔️ | ✔️ |
168+
| Permission | Creator | SQL Editor User | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
169+
| ---------- | ------- | --------------- | ----------------- | ------------- | ------------- | --------------- |
170+
| Star | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
171+
| Read | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
172+
| Write | ✔️ | | | ✔️ | ✔️ | ✔️ |
173+
| Delete | ✔️ | | | ✔️ | ✔️ | ✔️ |
176174

177175
#### Public Sheet
178176

179-
| Permission | Creator | SQL Editor User | Project Exporter | Project Developer | Project Owner | Others |
180-
| ---------- | ------- | --------------- | ---------------- | ----------------- | ------------- | ------ |
181-
| Star | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
182-
| Read | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
183-
| Write | ✔️ | | | | ✔️ | |
184-
| Delete | ✔️ | | | | ✔️ | |
177+
| Permission | Creator | SQL Editor User | Project Developer | Project Owner | Others |
178+
| ---------- | ------- | --------------- | ----------------- | ------------- | ------ |
179+
| Star | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
180+
| Read | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
181+
| Write | ✔️ | | | ✔️ | |
182+
| Delete | ✔️ | | | ✔️ | |
185183

186184
### Issue Permissions
187185

188-
| Issue Permission | Assignee | Creator | SQL Editor User | Project Exporter | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
189-
| ------------------------- | -------- | ------- | --------------- | ---------------- | ----------------- | ------------- | ------------- | --------------- |
190-
| Create issue | N/A | N/A | | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
191-
| Change issue status | ✔️ | | | | | Depends\* | ✔️ | ✔️ |
192-
| Edit name and description | ✔️ | ✔️ | | | | | ✔️ | ✔️ |
193-
| Edit SQL Statement | | ✔️ | | | | | | |
194-
| Subscribe/Unsubscribe | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
195-
| Add comment | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
186+
| Issue Permission | Assignee | Creator | SQL Editor User | Project Developer | Project Owner | Workspace DBA | Workspace Admin |
187+
| ------------------------- | -------- | ------- | --------------- | ----------------- | ------------- | ------------- | --------------- |
188+
| Create issue | N/A | N/A | | ✔️ | ✔️ | ✔️ | ✔️ |
189+
| Change issue status | ✔️ | | | | Depends\* | ✔️ | ✔️ |
190+
| Edit name and description | ✔️ | ✔️ | | | | ✔️ | ✔️ |
191+
| Edit SQL Statement | | ✔️ | | | | | |
192+
| Subscribe/Unsubscribe | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
193+
| Add comment | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
196194

197195
\* `Project Owner` can change issue status when the current active [Environment Rollout Policy](/change-database/environment-policy/rollout-policy) is set to **Require manual rolling out**.

mintlify/change-database/environment-policy/overview.mdx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Configure and manage your database environments including policies, permissions,
1010

1111
You can configure any color for an environment either by inputting in **HEX** tab or choosing one in the palette.
1212

13-
![env-color](/content/docs/administration/environment-policy/env-color.webp)
14-
1513
SQL Editor then displays the configured color tab.
1614

1715
![env-color-sql-editor](/content/docs/administration/environment-policy/env-color-sql-editor.webp)
@@ -20,8 +18,6 @@ SQL Editor then displays the configured color tab.
2018

2119
Once you mark an environment as a production environment, Bytebase will attach a shield icon 🛡️ besides the environment name.
2220

23-
![tier-envs](/content/docs/administration/environment-policy/tier-envs.webp)
24-
2521
## Rollout policy
2622

2723
Control who can deploy changes to each environment and whether deployments happen automatically or require manual approval.
@@ -45,15 +41,14 @@ Configure environment-specific restrictions for SQL Editor operations:
4541
- **Restrict data copying in SQL Editor**: Only Workspace Admins and DBAs can copy data from query results
4642
- **Restrict querying admin data sources**: Limit access to administrative data sources in the SQL Editor
4743

48-
## Statement execution mode
44+
## Statement execution
4945

50-
Even if you have `sql.dml` and `sql.ddl` [database permissions](/security/database-permission/overview/), you can only run read-only statements such as `SELECT` in SQL Editor by default. If you attempt to run mutation DML or DDL, it will prompt you to submit an issue.
46+
By default, users with **SQL Editor User** role or `sql.dml` and `sql.ddl` [database permissions](/security/database-permission/overview/) can execute DDL and DML statements directly in SQL Editor. To restrict statement execution to SELECT-only queries and require users to create issues for data modifications, turn on the following **statement execution** settings (**Default**: `off`/`off`):
5147

52-
![prompt-issue](/content/docs/administration/environment-policy/prompt-issue.webp)
48+
- Disallow running DDL statements in the SQL editor
49+
- Disallow running data-modifying DML statements in the SQL Editor
5350

54-
If you want to run those statements directly in SQL Editor, you need to turn on the **statement execution** setting.
55-
56-
![statement-execution](/content/docs/administration/environment-policy/statement-execution.webp)
51+
![prompt-issue](/content/docs/administration/environment-policy/prompt-issue.webp)
5752

5853
## Delete an environment
5954

mintlify/changelog/bytebase-3-11-0.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import InstallUpgrade from '/snippets/install/install-upgrade.mdx';
1111

1212
- **Environment rollout policy update**
1313
- **Issue Creators** and **Last Issue Approvers** can no longer roll out issues. Manual rollouts now require specifying workspace/project roles or users with the `bb.taskRuns.create` permission.
14-
- The force rollout mechanism has been replaced by configurable rollout requirements:
14+
- The force rollout mechanism has been replaced by [configurable rollout requirements](/change-database/environment-policy/rollout-policy#configurable-rollout-requirements):
1515
- **Require Issue Approval** – ensures issues must be approved before rollout can proceed (default: enabled).
1616
- **Plan Check Enforcement** – controls rollout behavior based on plan check results (default: block on errors only).
1717

18-
- Deprecate `bb.sql.export` permission and `roles/projectExporter` role.
18+
- Deprecate `bb.sql.export` permission and `roles/projectExporter` role. It’s merged into `SQL Editor User` role, which now can export directly in SQL Editor; Developer can still create Export issue as before.
1919
- Deprecate `request.row_limit` in the project IAM policy. Use `maximum_result_rows` in `QueryDataPolicy` instead.
2020

2121
- **API**
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mintlify/onboarding/sql-editor-data-access-control.mdx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,10 @@ the project.
4343

4444
<Tip>
4545

46-
`SQL Editor User` is a built-in role that allows users to run `EXPLAIN` and `SELECT`. If you want to allow users
47-
to run `EXPLAIN` only, you can create a [custom role](/administration/roles) with `bb.sql.explain` permission.
46+
`SQL Editor User` is a built-in role that allows users to run `EXPLAIN`, `SELECT` and export data. If you want to allow users to run `EXPLAIN` only, you can create a [custom role](/administration/roles) with `bb.sql.explain` permission.
4847

4948
</Tip>
5049

51-
### Fine-Grained Export
52-
53-
Export is a special case of query access. You need to grant the `Project Exporter` role to the user inside the project.
54-
5550
### Just-In-Time Access
5651

5752
You may disallow any production access by default and only allow temporary access on-demand. Users can this request temporary access

mintlify/security/database-permission/export.mdx

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
---
2-
title: One-Time Export
2+
title: Export Data
33
---
44

5-
Except for requesting or being assigned `Project Exporter` role to export data repeatedly, you can also request a one-time export in **Export Center**.
5+
There are two ways to export data:
66

7-
## One-time Export Request
8-
9-
Approval flow matches the `Export Data` in [custom approval](/change-database/approval/) if configured.
7+
- As **SQL Editor User**, you can export directly from SQL Editor.
8+
- As **Project Developer**, you can request a one-time export in **Export Center**.
109

11-
### Request from SQL Editor
10+
## Export directly from SQL Editor
1211

13-
Data can be exported directly from the SQL Editor result panel if you have the export permission for the data.
12+
As **SQL Editor User**, after you run a query, you can export the result by clicking **Export** button. The exported data still respects the masking policy to mask exported columns.
1413

1514
![sql-editor](/content/docs/security/database-permission/export/sql-editor.webp)
1615

17-
Without the export permission, you can request a one-time export via **Request Export**.
18-
19-
![sql-editor-request-export](/content/docs/security/database-permission/export/sql-editor-request-export.webp)
20-
21-
You will be redirected to an issue page. **Create** the issue. After approval, you'll be able to export the data one time.
22-
23-
![sql-editor-export](/content/docs/security/database-permission/export/sql-editor-export.webp)
16+
## One-time Export Request
2417

25-
### Request from Export Center
18+
As **Project Developer**, you can request a one-time export in **Export Center**. Approval flow matches the `Export Data` in [custom approval](/change-database/approval/) if configured.
2619

2720
Enter **Export Center** within a project, where you **Request Export**, select a database and click **Next**.
2821

@@ -32,7 +25,7 @@ You'll be creating an issue. Enable **Encrypt** and set **Password** if needed,
3225

3326
![export-preview](/content/docs/security/database-permission/export/export-preview.webp)
3427

35-
After approval, you can click **Export** to download the exported file _once_.
28+
After approval, you can click **Export** to download the exported file **unlimited times** within 24 hours.
3629

3730
![export](/content/docs/security/database-permission/export/export.webp)
3831

0 commit comments

Comments
 (0)