fix: 修复管理员编辑其他用户流水线任务时归属userid也被修改的bug

pull/213/head
xiaojunnuo 2024-10-10 14:57:26 +08:00
parent 56711c6040
commit e85c47744c
2 changed files with 4 additions and 3 deletions

View File

@ -62,9 +62,10 @@ export class PipelineController extends CrudController<PipelineService> {
@Post('/save', { summary: Constants.per.authOnly })
async save(@Body(ALL) bean: PipelineEntity) {
bean.userId = this.getUserId();
if (bean.id > 0) {
await this.authService.checkEntityUserId(this.ctx, this.getService(), bean.id);
} else {
bean.userId = this.getUserId();
}
await this.service.save(bean);
return this.ok(bean.id);

View File

@ -26,7 +26,7 @@ export class WoaiCdnPlugin extends AbstractTaskPlugin {
title: '域名证书',
helper: '请选择前置任务输出的域名证书',
component: {
name: 'pi-output-selector',
name: 'output-selector',
from: ['CertApply', 'CertApplyLego'],
},
required: true,
@ -36,7 +36,7 @@ export class WoaiCdnPlugin extends AbstractTaskPlugin {
title: 'Access授权',
helper: '我爱云的用户、密码授权',
component: {
name: 'pi-access-selector',
name: 'access-selector',
type: 'woai',
},
required: true,