feat(auth): JWT 中间件预留 department_ids 填充位置

当前 department_ids 为空列表,附带 TODO 注释说明
待 user_positions 关联表建立后补充查询逻辑。
This commit is contained in:
iven
2026-04-17 10:34:06 +08:00
parent 527a57df9e
commit f4b1a06d53

View File

@@ -47,6 +47,8 @@ pub async fn jwt_auth_middleware_fn(
return Err(AppError::Unauthorized); return Err(AppError::Unauthorized);
} }
// TODO: 待 user_positions 关联表建立后,从数据库查询用户所属部门 ID 列表
// 当前阶段 department_ids 为空列表,行级数据权限默认为 all
let ctx = TenantContext { let ctx = TenantContext {
tenant_id: claims.tid, tenant_id: claims.tid,
user_id: claims.sub, user_id: claims.sub,