| DB | Areas | X-idx | Tables | Sequences | <- _sec-authentication-system | _sec-granted-role-condition -> | HtmlDict 11 |
This table defines the roles that are granted to specific users or to other roles for the purpose of grouping roles. The _Grantee is therefore either a user or a role. The SQL standard states that a role cannot be defined with the same name as a user account and vice-versa. This constraint is generally useful and is enforced in all cases, thereby avoiding the need to record whether a granted role is for a user or for a role. The definition of roles in the _sec-role table is optional as only the role name is required, but if roles are defined then validation will be implemented to ensure that only a valid role is used. The grant sequence defines the order that any privileges associated with the role should be applied in order to resolve conflicting privileges in multiple granted roles. The grant sequence is not important for SQL roles because in SQL all privileges are positive in nature and therefore conflicts are not an issue. Privileges simply accumulate in SQL for the user and their roles. Despite this the sequence field would still be specified to support the granting of a role to a user multiple times. A role may be granted according to a pre-determined condition, e.g. the role may only be valid when the user logs into a specific company or module or between certain hours. The grant condition could contain tokens that could be checked at runtime against the authenticated credentials. This concept does not exist in SQL and so for SQL would be ignored. Specifically to support SQL, when a role is granted to a user or role, it can optionally be specified with admin rights that additionally grant the ability to pass the role onto other users or roles. This concept however could also be useful for non-SQL applications.
| Area | Schema Area |
|---|---|
| Dumpname | _sec-granted-role |
| Label | ? |
| Val.exp | ? |
| Val.msg |
| Order | Field Name | x | Label | Datatype | Format | Initial | Mand | Description |
|---|---|---|---|---|---|---|---|---|
| 7 | _Custom-grant-detail | X | Custom grant detail | character | X(500) | V: e sz 70 BY 8 sv MAX-CHARS 500 D: This is a custom field to specify additional grant details. |
||
| 5 | _Grant-rights | X | Grant rights | logical | YES/NO | NO | V: tb D: If set to YES, the user or role may grant the use of this role to other users or roles. This is a SQL concept but could be useful for non-SQL applications as well. |
|
| 2 | _Granted-role-guid | X | Granted role guid | character | X(28) | D: This is a globally unique identifier (guid) to identify this role membership record. This field is used as the foreign key for related tables that extend the standard functionality, e.g. for the _sec-granted-role-condition to limit the conditions under which the role is granted. | ||
| 3 | _Grantee | X | Grantee | character | X(32) | D: The user or the role that is granted the use of this role and its associated permissions. | ||
| 9 | _Grantee-DomainId | X | ? | int64 | ->>>>>9 | 0 | D: Grantee's Domain Id. | |
| 6 | _Grantor | X | Grantor | character | X(32) | D: The user or the role that granted the use of this role and its associated permissions. | ||
| 8 | _Grantor-DomainId | X | ? | int64 | ->>>>>9 | 0 | D: Grantor's Domain Id | |
| 11 | _Role-attr | X | ? | character | X(8) | ? | D: Role Attribute. | |
| 4 | _Role-name | X | Role name | character | X(32) | D: This is the name of the role being granted and the specified role must be defined in the _sec-role definition table. The role name will be defined with a namespace to avoid conflicts. It will be limited to 32 characters and will be case insensitive. The SQL standard states that a role cannot be defined with the same name as a user account and vice-versa. This constraint is generally useful and is enforced in all cases, thereby avoiding the need to record whether a granted role is for a user or for a role. System roles (e.g. DBA) will follow a standard naming convention in that they will all start with an underscore and a code to help determine which clients the system role is applicable to as follows; _SYS - System role applicable to all clients _PVM - PVM specific role. This role is only valid for 4GL clients _SQL - SQL specific role. This role is only valid for SQL clients This is purely a convention and no behavior is currently enforced that depends on it. For non-system roles, the same distinction between clients is also valid, so similar rules will be applied for role names that conform to the following convention; rolename beings with; SYS - applicable to all clients PVM - PVM specific role. This role is only valid for 4GL clients SQL - SQL specific role. This role is only valid for SQL clients If the rolename does not begin with any of the above, then the role will be applicable to all clients by default. | ||
| 10 | _Role-type | X | ? | int64 | >>>>>>>>>9 | 0 | D: Role Type. | |
| 12 | _SnapshotVer | X | ? | integer | >>>>9 | 0 |
| Index name | Flags | Fields | Datatype |
|---|---|---|---|
| _Granted-role-guid | P U | _Granted-role-guid (+) | character |
| _BiGrantee | U | _Role-name (+) | character |
| _Grantee-DomainId (+) | int64 | ||
| _Grantee (+) | character | ||
| _Grantor-DomainId (+) | int64 | ||
| _Grantor (+) | character | ||
| _SnapshotVer (+) | integer | ||
| _Grantee | U | _Grantee (+) | character |
| _Role-name (+) | character | ||
| _Grantor (+) | character | ||
| _Grantor | _Grantor (+) | character | |
| _Role-name | _Role-name (+) | character | |
| _Role-namtyp | _Role-name (+) | character | |
| _Role-type (+) | int64 | ||
| _Role-type | _Role-type (+) | int64 | |
| _Role-name (+) | character |
| + = Ascending | - = Descending | P = Primary | U = Unique | I = Inactive | W = Wordindex |
| generated 3-3-2025 10:55 |