mirror of https://github.com/certd/certd
fix: 修复管理员编辑其他用户流水线任务时归属userid也被修改的bug
parent
56711c6040
commit
e85c47744c
|
@ -62,9 +62,10 @@ export class PipelineController extends CrudController<PipelineService> {
|
||||||
|
|
||||||
@Post('/save', { summary: Constants.per.authOnly })
|
@Post('/save', { summary: Constants.per.authOnly })
|
||||||
async save(@Body(ALL) bean: PipelineEntity) {
|
async save(@Body(ALL) bean: PipelineEntity) {
|
||||||
bean.userId = this.getUserId();
|
|
||||||
if (bean.id > 0) {
|
if (bean.id > 0) {
|
||||||
await this.authService.checkEntityUserId(this.ctx, this.getService(), bean.id);
|
await this.authService.checkEntityUserId(this.ctx, this.getService(), bean.id);
|
||||||
|
} else {
|
||||||
|
bean.userId = this.getUserId();
|
||||||
}
|
}
|
||||||
await this.service.save(bean);
|
await this.service.save(bean);
|
||||||
return this.ok(bean.id);
|
return this.ok(bean.id);
|
||||||
|
|
|
@ -26,7 +26,7 @@ export class WoaiCdnPlugin extends AbstractTaskPlugin {
|
||||||
title: '域名证书',
|
title: '域名证书',
|
||||||
helper: '请选择前置任务输出的域名证书',
|
helper: '请选择前置任务输出的域名证书',
|
||||||
component: {
|
component: {
|
||||||
name: 'pi-output-selector',
|
name: 'output-selector',
|
||||||
from: ['CertApply', 'CertApplyLego'],
|
from: ['CertApply', 'CertApplyLego'],
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -36,7 +36,7 @@ export class WoaiCdnPlugin extends AbstractTaskPlugin {
|
||||||
title: 'Access授权',
|
title: 'Access授权',
|
||||||
helper: '我爱云的用户、密码授权',
|
helper: '我爱云的用户、密码授权',
|
||||||
component: {
|
component: {
|
||||||
name: 'pi-access-selector',
|
name: 'access-selector',
|
||||||
type: 'woai',
|
type: 'woai',
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
|
|
Loading…
Reference in New Issue