# Permissions and profiles

<a id="database.osattribclasses"></a>

## osattribclasses

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Attribute classes for organisation objects.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `id` | `nvarchar` | 32 |  |
| `ostype` | `int` | — |  |
| `name` | `nvarchar` | 255 |  |
| `org_id` | `nvarchar` | 32 |  |

<a id="database.osdepartment"></a>

## osdepartment

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Department master data of the organisation.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `id` | `int` | — |  |
| `name` | `nvarchar` | 255 |  |
| `osguid` | `nvarchar` | 32 |  |
| `description` | `nvarchar` | 255 |  |
| `osdefgroupguid` | `nvarchar` | 32 |  |

<a id="database.osadmdeptrel"></a>

## osadmdeptrel

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Administrator/department mapping — defines admin scopes per admin user.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `osguid` | `nvarchar` | 32 |  |
| `osdept_id` | `int` | — |  |
| `osuser_id` | `int` | — |  |
| `osdeptguid` | `nvarchar` | 32 |  |
| `osuserguid` | `nvarchar` | 32 |  |
| `rights` | `int` | — |  |

<a id="database.osprofile"></a>

## osprofile

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Holds the **profile configuration** of a profile user — i.e. which setting categories are active for them: desktop settings (UI layout, mask configuration) and enaio-client scanning settings. Multiple rows can exist per profile user — one per `flags` bit (one row for desktop settings and a second for scanning settings). The actual profile data (the concrete setting values) lives in a different table.

Referenced by the field [`benutzer.profil`](users_and_groups.md#database.benutzer) (`int`, holds the `benutzer.id` of the profile user): the link to this table is `osprofile.userid` = `benutzer.osguid` **of the profile user**. The `benutzer.profil` field must therefore first be resolved via the `benutzer` table to obtain the `osguid`.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `userid` | `nvarchar` | 32 | `osguid` of the user serving as the profile user. Corresponds to [`benutzer.osguid`](users_and_groups.md#database.benutzer). |
| `flags` | `int` | — | Bitmask defining the purpose of the profile record: |

<a id="database.osrights"></a>

## osrights

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Permission master data (right/role/action definitions).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `accessid` | `int` | — |  |
| `objtype` | `int` | — |  |
| `rights` | `int` | — |  |

<a id="database.ossysroles"></a>

## ossysroles

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

System roles — mapping role ↔ permission set.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `osuserid` | `nvarchar` | 32 |  |
| `osright` | `int` | — |  |
