feat(auth): 账号类型收敛为四种 + 对外下发中文标签(文本)

- account_type(role)→operator/carrier/opc_member/service; 非运营非OPC一律service; sub_role置None
- 登录/me/资料统一返回 account_type + account_type_label(运营方/载体方/OPC/服务方); 前端直接渲染文本
- 权限按账号类型解析(service→provider基座), 逻辑集中在 app/domain/account_types.py
This commit is contained in:
Pine
2026-08-26 13:09:02 +08:00
parent af6f01c5a9
commit 00f43976b3
3 changed files with 19 additions and 7 deletions
+3
View File
@@ -84,6 +84,9 @@ class UserProfile(BaseModel):
# RBAC(登录/me 返回;update-profile 不重签时不返回权限明细)
role: str = "opc_member"
sub_role: str | None = None
# 账号类型(四种)与中文标签 —— 前端直接渲染文本,不做代码映射
account_type: str = "service"
account_type_label: str = "服务方"
org_id: str | None = None
region_id: str | None = None
permissions: list[str] = Field(default_factory=list)