mirror of
https://github.com/certd/certd.git
synced 2026-05-17 13:57:31 +08:00
perf: 检查cname是否正确配置
This commit is contained in:
@@ -18,6 +18,7 @@ export class AccessService extends BaseService<AccessEntity> {
|
||||
@Inject()
|
||||
encryptService: EncryptService;
|
||||
|
||||
//@ts-ignore
|
||||
getRepository() {
|
||||
return this.repository;
|
||||
}
|
||||
@@ -101,13 +102,13 @@ export class AccessService extends BaseService<AccessEntity> {
|
||||
return await super.update(param);
|
||||
}
|
||||
|
||||
async getById(id: any, userId?: number): Promise<any> {
|
||||
async getById(id: any, userId: number): Promise<any> {
|
||||
const entity = await this.info(id);
|
||||
if (entity == null) {
|
||||
throw new Error(`该授权配置不存在,请确认是否已被删除:id=${id}`);
|
||||
}
|
||||
if (userId !== entity.userId) {
|
||||
throw new PermissionException('您对该授权无访问权限');
|
||||
throw new PermissionException('您对该Access授权无访问权限');
|
||||
}
|
||||
// const access = accessRegistry.get(entity.type);
|
||||
const setting = this.decryptAccessEntity(entity);
|
||||
|
||||
@@ -13,6 +13,7 @@ export class HistoryLogService extends BaseService<HistoryLogEntity> {
|
||||
@InjectEntityModel(HistoryLogEntity)
|
||||
repository: Repository<HistoryLogEntity>;
|
||||
|
||||
//@ts-ignore
|
||||
getRepository() {
|
||||
return this.repository;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ export class HistoryService extends BaseService<HistoryEntity> {
|
||||
@Config('certd')
|
||||
private certdConfig: any;
|
||||
|
||||
//@ts-ignore
|
||||
getRepository() {
|
||||
return this.repository;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
@Config('certd')
|
||||
private certdConfig: any;
|
||||
|
||||
//@ts-ignore
|
||||
getRepository() {
|
||||
return this.repository;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export class StorageService extends BaseService<StorageEntity> {
|
||||
@InjectEntityModel(StorageEntity)
|
||||
repository: Repository<StorageEntity>;
|
||||
|
||||
//@ts-ignore
|
||||
getRepository() {
|
||||
return this.repository;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user