๐ Roles
The roles and permissions are an important entities of the role access service. We will describe the role-related concepts and details in the following.
Access Entity
The following properties for access table:
| Name | Type | Description | Unique | Required |
|---|---|---|---|---|
| access_id | INT | Primary key, unique access ID | โ | โ |
| access_name | String | Name of the access permissions | โ | โ |
| access_description | String | Description of the access permissions | โ | โ |
This table is designed to facilitate the creation and management of access groups within a multi-tenant system. Each access group can contain multiple roles, allowing for flexible and granular access control.
Roles Entity
The following properties for access_roles table:
| Name | Type | Description | Unique | Required |
|---|---|---|---|---|
| role_id | INT | Primary key, unique role ID | โ | โ |
| role_name | String | Name of the role | โ | โ |
| role_description | String | Description of the role | โ | โ |
Permissions Entity
The following properties for access_permissions table:
| Name | Type | Description | Unique | Required |
|---|---|---|---|---|
| permission_id | INT | Primary key, unique permission ID | โ | โ |
| permission_name | String | Name of the permission | โ | โ |
| permission_description | String | Description of the permission | โ | โ |
Role Permissions Entity
The following properties for access_role_permissions table (associative table for Roles and Permissions):
| Name | Type | Description | Unique | Required |
|---|---|---|---|---|
| role_id | INT | Foreign key from Roles table | โ | โ |
| permission_id | INT | Foreign key from Permissions table | โ | โ |
Access Roles Entity
The following properties for access_to_roles table (associative table for Access and Roles):
| Name | Type | Description | Unique | Required |
|---|---|---|---|---|
| access_id | INT | Foreign key from Access table | โ | โ |
| role_id | INT | Foreign key from Roles table | โ | โ |
This table is associate access group to the roles. The field ensures that access groups are properly segmented.
User Access Entity
The following properties for acces_users table (associative table for Users and Access):
| Name | Type | Description | Unique | Required |
|---|---|---|---|---|
| user_id | String | Foreign key from Users table | โ | โ |
| access_id | INT | Foreign key from Access table | โ | โ |
NOTE - Unique: Ensures the uniqueness of the values entered into a property of a database table. - Required: Ensures that the values entered a property of a database table can NOT be NULL.
This table is associate user to their access groups. The field ensures that access groups are properly segmented between different tenants, maintaining data isolation and security.
Default Data
System Role
We create default role System to allow all user access permissions, known as Super Admin. This role will be used for system maintenance and several administrator use cases only.
Powered by Berani Digital ID ยฉ 2024