Bounded Context: Authorization
Aggregate Root: Role
Module: Ums.Domain.Authorization.Role
Status: Production
Role is the tenant-scoped master catalog of responsibilities defined by a SystemSuite. It supplies the governed role identifier referenced by permission templates and profiles, while supporting an optional hierarchy for promotion and administration.
| Field | Rule |
|---|---|
Code |
Required and unique within SystemSuiteId; stable machine code. |
Value |
Required display value used by administrators. |
Description |
Functional explanation maintained with the catalog item. |
ParentRoleId |
Optional role in the same system suite. |
HierarchyLevel |
Root is 0; child is parent level plus one. |
PromotionOrder |
Non-negative order used by role governance flows. |
IsActive |
Lifecycle state; inactive records remain auditable. |
TenantId and SystemSuiteId are mandatory ownership boundaries.Result failures for business conditions; they do not use exceptions for flow control.classDiagram
class SystemSuite {
+Guid Id
}
class Role {
+Guid Id
+Guid TenantId
+Guid SystemSuiteId
+Guid ParentRoleId
+Code Code
+Name Value
+Description Description
+int HierarchyLevel
+int PromotionOrder
+bool IsActive
+Create()
+Update()
+Activate()
+Deactivate()
}
SystemSuite "1" --> "0..*" Role : defines
Role "0..1" --> "0..*" Role : parentOf
POST /system-suites/{systemSuiteId}/roles, PUT /system-suites/{systemSuiteId}/roles/{roleId}, and status endpoints.rolesBySystemSuite(systemSuiteId).Roles tab belongs to the selected System Suite detail panel.ErrorId for support; stack traces and implementation details are logged only through Serilog/Loki.[ums_authorization].[Roles].TenantId; SQL Server safeguards are secondary controls.