mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
chore: project
This commit is contained in:
@@ -257,7 +257,7 @@ export class HistoryController extends CrudController<HistoryService> {
|
||||
throw new PermissionException();
|
||||
}
|
||||
// 是否允许管理员查看
|
||||
const setting = await this.userSettingsService.getSetting<UserGrantSetting>(history.userId, UserGrantSetting, false);
|
||||
const setting = await this.userSettingsService.getSetting<UserGrantSetting>(history.userId, null, UserGrantSetting, false);
|
||||
if (setting?.allowAdminViewCerts!==true) {
|
||||
//不允许管理员查看
|
||||
throw new PermissionException("该流水线的用户还未授权管理员下载证书,请先让用户在”设置->授权委托“中打开开关");
|
||||
|
||||
@@ -103,11 +103,12 @@ export class PipelineController extends CrudController<PipelineService> {
|
||||
|
||||
@Post('/save', { summary: Constants.per.authOnly })
|
||||
async save(@Body(ALL) bean: { addToMonitorEnabled: boolean, addToMonitorDomains: string } & PipelineEntity) {
|
||||
const { userId } = await this.getProjectUserIdWrite()
|
||||
const { userId ,projectId} = await this.getProjectUserIdWrite()
|
||||
if (bean.id > 0) {
|
||||
await this.checkOwner(this.getService(), bean.id,"write",true);
|
||||
} else {
|
||||
bean.userId = userId;
|
||||
bean.projectId = projectId;
|
||||
}
|
||||
|
||||
if (!this.isAdmin()) {
|
||||
@@ -124,6 +125,7 @@ export class PipelineController extends CrudController<PipelineService> {
|
||||
await this.siteInfoService.doImport({
|
||||
text: bean.addToMonitorDomains,
|
||||
userId: userId,
|
||||
projectId: projectId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user