mirror of
https://github.com/certd/certd.git
synced 2026-07-30 17:27:46 +08:00
Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.42.6](https://github.com/certd/certd/compare/v1.42.5...v1.42.6) (2026-07-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复正常批量删除流水线报权限不足的bug ([5b50083](https://github.com/certd/certd/commit/5b500830a122c6c42dab054e57fed509050f94da))
|
||||
|
||||
## [1.42.5](https://github.com/certd/certd/compare/v1.42.4...v1.42.5) (2026-07-15)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.42.5",
|
||||
"version": "1.42.6",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -42,20 +42,20 @@
|
||||
"lint1": "eslint --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.42.5",
|
||||
"@certd/basic": "^1.42.5",
|
||||
"@certd/commercial-core": "^1.42.5",
|
||||
"@certd/acme-client": "^1.42.6",
|
||||
"@certd/basic": "^1.42.6",
|
||||
"@certd/commercial-core": "^1.42.6",
|
||||
"@certd/cv4pve-api-javascript": "^8.4.2",
|
||||
"@certd/jdcloud": "^1.42.5",
|
||||
"@certd/lib-huawei": "^1.42.5",
|
||||
"@certd/lib-k8s": "^1.42.5",
|
||||
"@certd/lib-server": "^1.42.5",
|
||||
"@certd/midway-flyway-js": "^1.42.5",
|
||||
"@certd/pipeline": "^1.42.5",
|
||||
"@certd/plugin-cert": "^1.42.5",
|
||||
"@certd/plugin-lib": "^1.42.5",
|
||||
"@certd/plugin-plus": "^1.42.5",
|
||||
"@certd/plus-core": "^1.42.5",
|
||||
"@certd/jdcloud": "^1.42.6",
|
||||
"@certd/lib-huawei": "^1.42.6",
|
||||
"@certd/lib-k8s": "^1.42.6",
|
||||
"@certd/lib-server": "^1.42.6",
|
||||
"@certd/midway-flyway-js": "^1.42.6",
|
||||
"@certd/pipeline": "^1.42.6",
|
||||
"@certd/plugin-cert": "^1.42.6",
|
||||
"@certd/plugin-lib": "^1.42.6",
|
||||
"@certd/plugin-plus": "^1.42.6",
|
||||
"@certd/plus-core": "^1.42.6",
|
||||
"@koa/cors": "^5.0.0",
|
||||
"@midwayjs/bootstrap": "3.20.11",
|
||||
"@midwayjs/cache": "3.14.0",
|
||||
|
||||
@@ -806,6 +806,8 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||
}
|
||||
|
||||
async batchDelete(ids: number[], userId: number, projectId?: number): Promise<number> {
|
||||
|
||||
ids = this.filterIds(ids);
|
||||
const userProjectQuery = this.buildUserProjectQuery(userId, projectId);
|
||||
await this.repository.delete({
|
||||
id: In(ids),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Config, Inject, Provide, Scope, ScopeEnum, sleep } from "@midwayjs/core";
|
||||
import { InjectEntityModel } from "@midwayjs/typeorm";
|
||||
import { In, MoreThan, Repository } from "typeorm";
|
||||
import { AccessService, BaseService, isEnterprise, NeedSuiteException, NeedVIPException, PageReq, SysPublicSettings, SysSettingsService, SysSiteInfo } from "@certd/lib-server";
|
||||
import { AccessService, BaseService, isEnterprise, NeedSuiteException, NeedVIPException, PageReq, SysPublicSettings, SysSettingsService, SysSiteInfo, ValidateException } from "@certd/lib-server";
|
||||
import { PipelineEntity } from "../entity/pipeline.js";
|
||||
import { PipelineDetail } from "../entity/vo/pipeline-detail.js";
|
||||
import { Executor, IAccessService, ICnameProxyService, INotificationService, Notification, Pipeline, pluginRegistry, ResultType, RunHistory, RunnableCollection, SysInfo, UserInfo } from "@certd/pipeline";
|
||||
@@ -966,15 +966,19 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
if (!isPlus()) {
|
||||
throw new NeedVIPException("此功能需要升级Certd专业版");
|
||||
}
|
||||
if (!ids || ids.length === 0) {
|
||||
throw new ValidateException("ids不能为空");
|
||||
}
|
||||
ids = this.filterIds(ids);
|
||||
|
||||
if (userId && userId > 0) {
|
||||
await this.checkUserId(ids, userId);
|
||||
}
|
||||
if (projectId) {
|
||||
await this.checkUserId(ids, projectId, "projectId");
|
||||
}
|
||||
for (const id of ids) {
|
||||
if (userId && userId > 0) {
|
||||
await this.checkUserId(id, userId);
|
||||
}
|
||||
if (projectId) {
|
||||
await this.checkUserId(id, projectId, "projectId");
|
||||
}
|
||||
await this.delete(id);
|
||||
ids.push(id);
|
||||
}
|
||||
return ids.length;
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ export class TemplateService extends BaseService<TemplateEntity> {
|
||||
}
|
||||
|
||||
async batchDelete(ids: number[], userId: number, projectId?: number): Promise<number> {
|
||||
ids = this.filterIds(ids);
|
||||
const where: any = {
|
||||
id: In(ids),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user