mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
fix: 修复自定义插件onlyAdmin报错的bug
This commit is contained in:
@@ -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("只有管理员才能运行此任务");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user