chore: 企业版鉴权时校验projectId非空

This commit is contained in:
xiaojunnuo
2026-10-22 15:09:01 +08:00
parent f50651ef91
commit b601b503e2
@@ -187,6 +187,9 @@ export class AuthorityMiddleware implements IWebMiddleware {
const openKeyRes = await this.openKeyService.verifyOpenKey(openKey);
let roles = []
if (isEnterprise()) {
if (!openKeyRes.projectId || openKeyRes.projectId <= 0) {
throw new Error("projectId不能为空");
}
roles = [1]
}else {
if (openKeyRes.projectId !=null) {