fix: 修复流水线分组可以被所有人看见的bug

This commit is contained in:
xiaojunnuo
2024-12-09 02:24:30 +08:00
parent 30ddf5ec41
commit a0e838d1ee
8 changed files with 17 additions and 12 deletions
@@ -78,9 +78,10 @@ export class HistoryController extends CrudController<HistoryService> {
@Post('/list', { summary: Constants.per.authOnly })
async list(@Body(ALL) body) {
body.query = body.query ?? {};
const isAdmin = await this.authService.isAdmin(this.ctx);
if (!isAdmin) {
body.userId = this.getUserId();
body.query.userId = this.getUserId();
}
if (body.pipelineId == null) {
return this.ok([]);