tables · table
UserrightsHdr
The UserrightsHdr table serves as a header-level security registry within the SQL Server database. It defines the access permissions for specific users across various software modules (forms) and menu items. Each record maps a specific user (usercode) to a system module (vbmodulename) and defines the authorization state using binary flags (moduleflag, menunameflag). This table is critical for enforcing role-based or user-based access control (RBAC) at the application interface level.
Row count
357
Last entry
—
Source
tables
Columns
7| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Primary key for the record (Internal ID). |
compcode | string | Yes | Company identification code. |
usercode | string | Yes | The login identifier for the user. |
vbmodulename | string | Yes | Physical name of the application form or module. |
vbmenuname | string | Yes | Name of the menu item associated with the module. |
moduleflag | string | Yes | Access flag for the module level. |
menunameflag | string | Yes | Access flag for the menu item level. |
Full documentation
### 1) Overview The `UserrightsHdr` table serves as a header-level security registry within the SQL Server database. It defines the access permissions for specific users across various software modules (forms) and menu items. Each record maps a specific user (`usercode`) to a system module (`vbmodulename`) and defines the authorization state using binary flags (`moduleflag`, `menunameflag`). This table is critical for enforcing role-based or user-based access control (RBAC) at the application interface level. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Primary key for the record (Internal ID). | 0, 1, 2... | `PRIMARY KEY` | | **compcode** | string | Yes | Company identification code. | e.g., "DAS" | `JOIN`, `WHERE` | | **usercode** | string | Yes | The login identifier for the user. | e.g., "accounts", "system" | `JOIN`, `WHERE` | | **vbmodulename** | string | Yes | Physical name of the application form or module. | e.g., "frmprod", "frmfgs" | `JOIN` | | **vbmenuname** | string | Yes | Name of the menu item associated with the module. | e.g., "M" | `WHERE` | | **moduleflag** | string | Yes | Access flag for the module level. | "Y" (Yes), "N" (No) | `WHERE` | | **menunameflag** | string | Yes | Access flag for the menu item level. | "Y" (Yes), "N" (No) | `WHERE` | ### 3) Relationships & Join Map The `UserrightsHdr` table acts as a central link between user master data and system configuration. #### Primary Relationships: * **dbo.pass1**: Joins `UserrightsHdr.usercode` to `pass1.username` (and `compcode`) to retrieve user credentials and computer-specific settings. * **dbo.userrights / dbo.userrightsmain**: Joins `UserrightsHdr.usercode` to `user_code` (and `compcode`) to access detailed permission levels (addition, deletion, modification). * **dbo.CompanyConfig**: Joins `UserrightsHdr.vbmodulename` to `CompanyConfig.ModuleName` (and `compcode`) to determine module-specific application logic. * **dbo.Form_Active_Status**: Joins `UserrightsHdr.usercode` to `Form_Active_Status.UserName` to track current session activity for a specific form. #### Join Map: | Source Column | Target Table | Target Column | Relationship Type | | :--- | :--- | :--- | :--- | | `usercode` | `dbo.pass1` | `username` | Many-to-One | | `usercode` | `dbo.userrights` | `user_code` | One-to-Many | | `usercode` | `dbo.userrightsmain` | `user_code` | One-to-Many | | `vbmodulename` | `dbo.CompanyConfig` | `ModuleName` | Many-to-One (Likely) | | `compcode` | *Most Tables* | `compcode` | Many-to-One |