mirror of https://github.com/certd/certd
fix: 修复自定义插件onlyAdmin报错的bug
parent
ab84835362
commit
4e5e862f58
|
@ -165,7 +165,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||
this.registerSecret(cert.one);
|
||||
}
|
||||
|
||||
if (this.ctx.define.onlyAdmin) {
|
||||
if (this.ctx?.define?.onlyAdmin) {
|
||||
if (!this.isAdmin()) {
|
||||
throw new Error("只有管理员才能运行此任务");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue