Dynamic role / permission management bounded context.
Locations
| Layer |
Path |
| Domain |
internal/domain/rbac/ |
| Application |
internal/application/authz/ — start with service.go |
| HTTP |
internal/adapters/http/handler/rbac_handler.go |
| GoUI |
internal/adapters/goui/controller_rbac_notifications.go |
| Persistence |
adapters/persistence/postgres/role_repository.go |
| Wiring |
wire_authz.go; wire_http.go, wire_goui.go |
Application
| File |
Role |
service.go |
Facade: permission/role CRUD, role-permission assignment |
resolver.go |
Resolver — session permission check (in-memory TTL cache) |
dto.go |
PermissionInfo, RoleInfo |
Resolver caches in process memory for single-process deployment; shared invalidation needed for multiple instances (not yet implemented).
HTTP surfaces
Registration: server.go → /api/v1/rbac/... (permission: rbac:manage)
| Method |
Path |
Handler |
| GET/POST |
/rbac/permissions |
List / Create permission |
| PATCH |
/rbac/permissions/:name |
Update permission |
| GET/POST |
/rbac/roles |
List / Create role |
| GET/PATCH/DELETE |
/rbac/roles/:name |
Get / Update / Delete role |
| PUT |
/rbac/roles/:name/permissions |
SetPermissions |
Panel surfaces
| Path |
Screen |
/dashboard/rbac/roles |
roles |
/dashboard/rbac/roles/new |
role-new |
/dashboard/rbac/roles/:name |
role-show |
/dashboard/rbac/permissions |
permissions |
Related