mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
perf: 支持授权给管理员查看和下载用户证书
This commit is contained in:
@@ -37,3 +37,12 @@ export class UserEmailSetting extends BaseSettings {
|
||||
|
||||
list:string[] = [];
|
||||
}
|
||||
|
||||
|
||||
|
||||
export class UserGrantSetting extends BaseSettings {
|
||||
static __title__ = "用户授权设置";
|
||||
static __key__ = "user.grant";
|
||||
|
||||
allowAdminViewCerts:boolean = false;
|
||||
}
|
||||
|
||||
@@ -1072,4 +1072,16 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
||||
});
|
||||
return res?.status;
|
||||
}
|
||||
|
||||
async getPipelineUserId(pipelineId: number) {
|
||||
const res = await this.repository.findOne({
|
||||
select: {
|
||||
userId: true
|
||||
},
|
||||
where: {
|
||||
id: pipelineId
|
||||
}
|
||||
});
|
||||
return res?.userId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user