Skip to content

Commit 6127ef7

Browse files
author
SPRINX0\prochazka
committed
reformulate permissions docs
1 parent f6e0e87 commit 6127ef7

File tree

1 file changed

+53
-39
lines changed

1 file changed

+53
-39
lines changed

content/admin/permissions.md

Lines changed: 53 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,75 @@ title: Permissions
33
weight: 50
44
---
55

6-
## Permissions system
7-
DbGate uses permission system with three dimensional hiearchy.
6+
DbGate’s permissions use **two dimensions**:
87

9-
One hiearchy dimension is inheritance of permissions from roles.
10-
- Predefined permission set
11-
- Predefined role (superadmin/logged-user/anonymous user)
12-
- Custom roles
13-
- User
8+
1. **Source of permissions (who sets them)**
9+
Permissions cascade from broad to specific. More specific settings override more general ones:
10+
* Predefined permission sets
11+
* Predefined roles (*superadmin*, *logged user*, *anonymous*)
12+
* Custom roles
13+
* Individual user
1414

15-
The second hiearchy dimension is inheritance from parent roles.
15+
2. **Object scope**
16+
Permissions can target specific **databases** and **tables/objects**. See **[Database permissions](#database-permissions)** and **[Table permissions](#table-permissions)**.
1617

17-
The third hiearchy dimension are permission for databases and tables. This applies only for [Database permissions](#database-permissions) and [Table permissions](#table-permissions).
18+
---
19+
20+
## Basic Permissions
21+
22+
Configure global/basic permissions in the **permission tree** in **User detail** or **Role detail**.
23+
24+
* A **greyed** checkbox means the permission is **inherited** (e.g., from a role or a predefined permission set), not set directly on that user/role.
1825

19-
## Basic permissions
20-
Basic permissions could be configured in permission tree avaialble in user detail and role detail. If checkbox with permission state is grayed, it means, that permission is inherited.
2126
![Role administration - DbGate](https://media.dbgate.io/img/user-administration-light.png)
2227

28+
---
29+
30+
## Database Permissions
2331

24-
## Database permissions
25-
You could configure permissions related to database on "Databases" tab (in Role detail and in User detail)
32+
Set database-level permissions on the **Databases** tab (in both Role detail and User detail).
2633

27-
Database permissions are not used, unless **"All databases"** is permission is active
34+
> **Important:** Database rules are applied **only if** the **All databases** permission is unchecked in the basic permissions.
2835
29-
Each line of databases permission rules table defines permission to matched database. The order of rules is important, permissions at the bottom override permissions at the top.
36+
* Each row in the rules table grants or denies access to databases that **match** the row’s filters.
37+
* **Rule order matters**: rules **lower** in the list **override** rules above them.
3038

3139
![Database permissions - DbGate](https://media.dbgate.io/img/database-permissions-light.png)
3240

33-
**Columns:**
34-
* Connection - define, on which connection this rule is applied
35-
* Database names - define database name (by list of names or by regular expression)
36-
* Role:
37-
* View - view database, without access to tables, views, etc.
38-
* Read content - access to database content, readonly
39-
* Write data - change data of tables
40-
* Run script - run any SQL script, create/drop/alter tables
41-
* Deny - don't allow access to this database
41+
**Columns**
42+
43+
* **Connection** – which connection the rule applies to.
44+
* **Database names** – databases to match (list of names or a regular expression).
45+
* **Role (access level)**
46+
* **View** – can see the database, but not its tables/views/etc.
47+
* **Read content** – read-only access to database content.
48+
* **Write data** – can modify table data.
49+
* **Run script** – can run any SQL script; can create/drop/alter objects.
50+
* **Deny** – blocks access to the database.
51+
52+
---
4253

4354
## Table Permissions
44-
You could configure permissions related to database on "Tables/Views/Objects" tab (in Role detail and in User detail)
4555

46-
Tables permissions are not used, unless **"All tables/views/objects"** is permission is active
56+
Set table/object-level permissions on the **Tables / Views / Objects** tab (in Role detail and User detail).
57+
58+
> **Important:** Table/object rules are applied **only if** the **“All tables/views/objects”** permission is unchecked in the basic permissions.
4759
48-
Each line of databases permission rules table defines permission to matched table. The order of rules is important, permissions at the bottom override permissions at the top.
60+
* Each row defines access to tables/objects that **match** the filters.
61+
* **Rule order matters**: rules **lower** in the list **override** rules above them.
62+
* By default, table permissions are **inherited from the database permission**.
4963

50-
The default table permission is inherited from database permission.
64+
**Columns**
5165

52-
**Columns:**
53-
* Connection - define, on which connection this rule is applied
54-
* Database names - define database name (by list of names or by regular expression)
55-
* Schema names - define schema name (by list of names or by regular expression)
56-
* Table names - define table/view/procedure/trigger name (by list of names or by regular expression)
57-
* Scope - defines types of matched object
58-
* Role:
59-
* Read - read table data
60-
* Update only - update table rows, don't allow to insert and delete operations
61-
* Run script - allow to run script with this table. In fact, if you don't have "Run script" permission on database level, this cannot be used
62-
* Deny - don't allow access to this table
66+
* **Connection** – which connection the rule applies to.
67+
* **Database names** – databases to match (list or regular expression).
68+
* **Schema names** – schemas to match (list or regular expression).
69+
* **Table names** – object names to match (table/view/procedure/trigger) as a list or regular expression.
70+
* **Scope** – which object types the rule covers (tables, views, procedures, triggers, …).
71+
* **Role (access level)**
72+
* **Read** – can read table data.
73+
* **Update only** – can update rows; **insert** and **delete** are not allowed.
74+
* **Run script** – can run a script that touches this object.
75+
> Note: If you **don’t** have **Run script** at the **database** level, you cannot use it at the table level.
76+
* **Deny** – blocks access to the object.
6377

0 commit comments

Comments
 (0)