mirror of https://github.com/certd/certd
fix: 修复套餐关闭状态下,仍然限制用户流水线数量的bug
parent
a323f3aa2c
commit
66fb9e5f49
|
@ -25,7 +25,7 @@ services:
|
|||
# - 8.8.4.4
|
||||
# extra_hosts:
|
||||
# # ↓↓↓↓ -------------------------------------------------------- 这里可以配置自定义hosts,外网域名可以指向本地局域网ip地址
|
||||
# - "localdomain.comm:192.168.1.3"
|
||||
# - "localdomain.com:192.168.1.3"
|
||||
|
||||
environment:
|
||||
# 设置环境变量即可自定义certd配置
|
||||
|
|
|
@ -204,6 +204,8 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||
// }
|
||||
if (isComm()) {
|
||||
//校验pipelineCount
|
||||
const suiteSetting = await this.userSuiteService.getSuiteSetting();
|
||||
if (suiteSetting.enabled) {
|
||||
const userSuite = await this.userSuiteService.getMySuiteDetail(bean.userId);
|
||||
if (userSuite?.pipelineCount.max != -1 && userSuite?.pipelineCount.used + 1 > userSuite?.pipelineCount.max) {
|
||||
throw new NeedSuiteException(`对不起,您最多只能创建${userSuite?.pipelineCount.max}条流水线,请购买或升级套餐`);
|
||||
|
@ -213,6 +215,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||
throw new NeedSuiteException(`对不起,您最多只能添加${userSuite.domainCount.max}个域名,请购买或升级套餐`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const userId = bean.userId;
|
||||
const userIsAdmin = await this.userService.isAdmin(userId);
|
||||
|
|
Loading…
Reference in New Issue