前端 getCurSchId 对无学校身份(超管/平台账号)下发哨兵 -1(store: schId || -1), UserBase 2026-10-12 学校单点开通硬闸门对显式 schoolId 先过 assertSchoolId, -1 非合法学校主键被拒("学校分组不存在"),且超管豁免(isSuperAdmin bypass) 在校验之后根本走不到。OpenApiAppRemoteServiceImpl 边界归一:schoolId<=0 → null, 交 UserBase 按激活身份/主归属兜底——超管恢复全量豁免,GetAppInfoById 同口径覆盖。
This commit is contained in:
@@ -29,6 +29,12 @@ public class OpenApiAppRemoteServiceImpl implements AppRemoteService {
|
||||
if (user == null || user.getId() == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 前端 getCurSchId 对无学校身份(超管/平台账号)下发哨兵 -1(store: schId || -1),非合法学校主键;
|
||||
// UserBase 2026-10-12 硬闸门对显式 schoolId 先过 assertSchoolId,-1 会被拒("学校分组不存在"),
|
||||
// 且超管豁免(isSuperAdmin bypass)在校验之后根本走不到——边界归一为 null 交服务端按激活身份/主归属兜底。
|
||||
if (schoolId != null && schoolId <= 0) {
|
||||
schoolId = null;
|
||||
}
|
||||
// PC 浏览器端;schoolId 透传 UserBase 做学校单点开通收窄(为空则服务端按身份/主归属兜底)
|
||||
return YschBaseOpenApi.getUserApp(user.getId(), ClientEnum.PC_BROWSER, schoolId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user