Tài liệu sống được đồng bộ theo codebase hiện tại.
Hierarchy User → Organization → Workspace → Website.
Hierarchy chuẩn
User
-> Organization
-> Workspace
-> Website
Ý nghĩa từng lớp
| Layer | Ý nghĩa |
|---|
| User | global identity |
| Organization | account + billing boundary |
| Workspace | permission + enablement boundary |
| Website | public runtime boundary |
Quy tắc authorization
- Tenant access đi từ membership hoặc ownership.
workspaceId chỉ chọn context, không tự tạo quyền.
- Support access chỉ hợp lệ nếu có support session runtime.
- Feature gating cần đi qua entitlement thật ở backend.
Điều cần nhớ khi code
users.roleId không thay thế được tenant membership.
- Scope query ở repository/service trước, không đẩy xuống UI.