|
| 1 | +--- |
| 2 | +title: Permissions |
| 3 | +weight: 50 |
| 4 | +--- |
| 5 | + |
| 6 | +## Permissions system |
| 7 | +DbGate uses permission system with two dimensional hiearchy. |
| 8 | + |
| 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 |
| 14 | + |
| 15 | +The second hiearchy dimension is inheritance from parent roles. |
| 16 | + |
| 17 | +## Database permissions |
| 18 | +You could configure permissions related to database on "Databases" tab (in Role detail and in User detail) |
| 19 | + |
| 20 | +Database permissions are not used, unless **"All databases"** is permission is active |
| 21 | + |
| 22 | +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. |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +**Columns:** |
| 27 | +* Connection - define, on which connection this rule is applied |
| 28 | +* Database names - define database name (by list of names or by regular expression) |
| 29 | +* Role: |
| 30 | + * View - view database, without access to tables, views, etc. |
| 31 | + * Read content - access to database content, readonly |
| 32 | + * Write data - change data of tables |
| 33 | + * Run script - run any SQL script, create/drop/alter tables |
| 34 | + * Deny - don't allow access to this database |
| 35 | + |
| 36 | +## Table Permissions |
| 37 | +You could configure permissions related to database on "Tables/Views/Objects" tab (in Role detail and in User detail) |
| 38 | + |
| 39 | +Tables permissions are not used, unless **"All tables/views/objects"** is permission is active |
| 40 | + |
| 41 | +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. |
| 42 | + |
| 43 | +**Columns:** |
| 44 | +* Connection - define, on which connection this rule is applied |
| 45 | +* Database names - define database name (by list of names or by regular expression) |
| 46 | +* Schema names - define schema name (by list of names or by regular expression) |
| 47 | +* Table names - define table/view/procedure/trigger name (by list of names or by regular expression) |
| 48 | +* Scope - defines types of matched object |
| 49 | +* Role: |
| 50 | + * Read - read table data |
| 51 | + * Update only - update table rows, don't allow to insert and delete operations |
| 52 | + * 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 |
| 53 | + * Deny - don't allow access to this table |
| 54 | + |
0 commit comments