Skip to content

Commit 9c5cb66

Browse files
committed
docs: statement execution
1 parent 436dd2f commit 9c5cb66

File tree

10 files changed

+52
-35
lines changed

10 files changed

+52
-35
lines changed

content/docs/_layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ expand_section_list: ['Self-host']
225225

226226
### [Database Instance](/administration/instance)
227227

228-
### [Environment Tier](/administration/environment-policy/tier)
228+
### [Environment Policy](/administration/environment-policy/overview)
229229

230230
### [Customize Logo](/administration/customize-logo)
231231

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Environment Policy
3+
---
4+
5+
## Execution Mode
6+
7+
Even if you have `databases.queryDML` and `databases.queryDDL` permissions, you can only run SELECT in [SQL Editor](/docs/sql-editor/overview/) by default. If you attempt to run mutation DML or DDL, it will prompt you to submit an issue.
8+
9+
![change-prompt](/content/docs/administration/environment-policy/sql-editor-change-prompt.webp)
10+
11+
If you want to run those statements directly in SQL Editor, you need to turn on the statement execution setting.
12+
13+
![statement-execution](/content/docs/administration/environment-policy/sql-editor-statement-execution.webp)
14+
15+
## Environment Tier
16+
17+
<PricingPlanBlock feature_name='ENVIRONMENT_TIER' />
18+
19+
For production environments, extra care should be taken. Bytebase allows marking such an environment as a production environment. Workspace admin or DBA can configure this under the Environment Tier section from the environment detail page.
20+
21+
When an environment is marked as a production environment, a shield indicator will appear before the environment label. It lets users know that it is a production environment.
22+
23+
See the following example, the environment “Prod” is marked as a production environment. You can find the shield indicator on different pages.
24+
25+
![tier-envs](/content/docs/administration/environment-policy/tier/env-tier-envs.webp)
26+
27+
![tier-issue-details](/content/docs/administration/environment-policy/tier/env-tier-issue-details.webp)
28+
29+
A caution notice will also appear at the top of the SQL Editor when you connect to an instance in a production environment.
30+
31+
![tier-editor](/content/docs/administration/environment-policy/tier/env-tier-editor.webp)
32+
33+
By default, instances and databases in a production environment will be inaccessible to developers. Workspace admins and DBAs can configure some databases as accessible to developers via [Database Permission](/docs/security/database-permission/overview).

content/docs/administration/environment-policy/tier.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,3 @@
22
title: Environment Tier
33
feature_name: ENVIRONMENT_TIER
44
---
5-
6-
For production environments, extra care should be taken. Bytebase allows marking such an environment as a production environment. Workspace admin or DBA can configure this under the Environment Tier section from the environment detail page.
7-
8-
When an environment is marked as a production environment, a shield indicator will appear before the environment label. It lets users know that it is a production environment.
9-
10-
See the following example, the environment “Prod” is marked as a production environment. You can find the shield indicator on different pages.
11-
12-
![tier-envs](/content/docs/administration/tier/env-tier-envs.webp)
13-
14-
![tier-issue-details](/content/docs/administration/tier/env-tier-issue-details.webp)
15-
16-
A caution notice will also appear at the top of the SQL Editor when you connect to an instance in a production environment.
17-
18-
![tier-editor](/content/docs/administration/tier/env-tier-editor.webp)
19-
20-
By default, instances and databases in a production environment will be inaccessible to developers. Workspace admins and DBAs can configure some databases as accessible to developers via [Database Permission](/docs/security/database-permission/overview).

content/docs/security/database-permission/overview.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ feature_name: DATABASE_PERMISSION
77

88
Database permission controls individual users' or groups' actions within the database. Below shows the built-in roles' database permissions.
99

10-
| Role | EXPLAIN | Query | Export | Data-modifying DML | DDL | Admin |
11-
| ----------------- | ------- | ----- | ------ | ------------------ | --- | ----- |
12-
| Workspace Admin |||| |||
13-
| Workspace DBA |||| |||
14-
| Project Owner |||| |||
15-
| Project Developer | | | | || |
16-
| Project Querier | || | | | |
17-
| Project Exporter | | || | | |
18-
| Project Releaser | | | | | | |
19-
| Project Viewer | | | | | | |
10+
| Role | EXPLAIN | Query | Export | Mutation DML | DDL | Admin |
11+
| ----------------- | ------- | ----- | ------ | ------------ | --- | ----- |
12+
| Workspace Admin |||||||
13+
| Workspace DBA |||||||
14+
| Project Owner |||||||
15+
| Project Developer | | | ||| |
16+
| Project Querier | || | | | |
17+
| Project Exporter | | || | | |
18+
| Project Releaser | | | | | | |
19+
| Project Viewer | | | | | | |
2020

2121
You can also pick out specific permissions to build [custom roles](/docs/administration/custom-roles/). e.g. create a custom role that grants only the [EXPLAIN](/docs/security/database-permission/explain/) permission.
2222

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
| Access Level | Operation | Permission |
2-
| ------------------------------------- | ------------------ | ------------------------ |
3-
| [Read](/docs/sql-editor/run-queries/) | EXPLAIN | `databases.queryExplain` |
4-
| | Query | `databases.query` |
5-
| | Export | `databases.export` |
6-
| Write | Data-modifying DML | `databases.queryDML` |
7-
| | DDL | `databases.queryDDL` |
8-
| [Admin](/docs/sql-editor/admin-mode/) | Admin | `instances.adminExecute` |
1+
| Access Level | Operation | Permission |
2+
| ----------------------------------------------------------------------------------------------------- | ------------ | ------------------------ |
3+
| [Read](/docs/sql-editor/run-queries/) | EXPLAIN | `databases.queryExplain` |
4+
| | Query | `databases.query` |
5+
| | Export | `databases.export` |
6+
| Write (subject to [execution mode](/docs/administration/environment-policy/overview/#execution-mode)) | Mutation DML | `databases.queryDML` |
7+
| | DDL | `databases.queryDDL` |
8+
| [Admin](/docs/sql-editor/admin-mode/) | Admin | `instances.adminExecute` |
15.1 KB
Loading
21.9 KB
Loading

public/content/docs/administration/tier/env-tier-editor.webp renamed to public/content/docs/administration/environment-policy/tier/env-tier-editor.webp

File renamed without changes.

public/content/docs/administration/tier/env-tier-envs.webp renamed to public/content/docs/administration/environment-policy/tier/env-tier-envs.webp

File renamed without changes.

public/content/docs/administration/tier/env-tier-issue-details.webp renamed to public/content/docs/administration/environment-policy/tier/env-tier-issue-details.webp

File renamed without changes.

0 commit comments

Comments
 (0)