mirror of
https://github.com/certd/certd.git
synced 2026-10-25 10:04:07 +08:00
chore: 企业版鉴权时校验projectId非空
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user