feat(auth): 微信登录自动分配 patient 角色 + 创建患者档案
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- 新增迁移 m20260510_000133:为所有租户创建 patient 角色并分配 19 个权限
- wechat_service: bind_phone 自动 assign_patient_role + ensure_patient_record
- find_or_create_user_by_phone 新用户自动获得 patient 角色和患者档案
- 小程序 auth store: bindPhone 抛出异常而非静默返回 false
- 小程序登录页: 捕获绑定错误并显示可操作的对话框
This commit is contained in:
iven
2026-05-10 09:57:45 +08:00
parent 28bcdc4208
commit 11101ac204
5 changed files with 238 additions and 12 deletions

View File

@@ -134,6 +134,7 @@ mod m20260507_000129_fix_nurse_operator_points_permissions;
mod m20260508_000130_fix_operator_permissions_and_nurse_devices;
mod m20260508_000131_fix_all_role_permissions;
mod m20260508_000132_fix_doctor_permissions_restore;
mod m20260510_000133_create_patient_role;
pub struct Migrator;
@@ -275,6 +276,7 @@ impl MigratorTrait for Migrator {
Box::new(m20260508_000130_fix_operator_permissions_and_nurse_devices::Migration),
Box::new(m20260508_000131_fix_all_role_permissions::Migration),
Box::new(m20260508_000132_fix_doctor_permissions_restore::Migration),
Box::new(m20260510_000133_create_patient_role::Migration),
]
}
}