diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbScriptResourceV3Impl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbScriptResourceV3Impl.java index 0e4dddbf7e..0aab228edc 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbScriptResourceV3Impl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/esb/impl/v3/EsbScriptResourceV3Impl.java @@ -353,6 +353,7 @@ public EsbResp createScriptVersion( @EsbApiTimed(value = CommonMetricNames.ESB_API, extraTags = {"api_name", "v3_delete_script"}) @AuditEntry(actionId = ActionId.MANAGE_SCRIPT) public EsbResp deleteScript(@AuditRequestBody EsbDeleteScriptV3Req request) { + request.fillAppResourceScope(appScopeMappingService); scriptService.deleteScript(request.getUserName(), request.getAppId(), request.getScriptId()); return EsbResp.buildSuccessResp(null); } @@ -361,6 +362,7 @@ public EsbResp deleteScript(@AuditRequestBody EsbDeleteScriptV3Req request) { @EsbApiTimed(value = CommonMetricNames.ESB_API, extraTags = {"api_name", "v3_delete_script_version"}) @AuditEntry(actionId = ActionId.MANAGE_SCRIPT) public EsbResp deleteScriptVersion(@AuditRequestBody EsbDeleteScriptVersionV3Req request) { + request.fillAppResourceScope(appScopeMappingService); scriptService.deleteScriptVersion(request.getUserName(), request.getAppResourceScope().getAppId(), request.getScriptVersionId()); return EsbResp.buildSuccessResp(null); @@ -371,6 +373,8 @@ public EsbResp deleteScriptVersion(@AuditRequestBody EsbDeleteScriptVersionV3Req @AuditEntry(actionId = ActionId.MANAGE_SCRIPT) public EsbResp disableScriptVersion( @AuditRequestBody EsbManageScriptVersionV3Req request) { + + request.fillAppResourceScope(appScopeMappingService); scriptService.disableScript(request.getAppResourceScope().getAppId(), request.getUserName(), request.getScriptId(), request.getScriptVersionId()); ScriptDTO scriptVersion = scriptService.getScriptVersion(request.getScriptVersionId()); @@ -382,6 +386,8 @@ public EsbResp disableScriptVersion( @AuditEntry(actionId = ActionId.MANAGE_SCRIPT) public EsbResp publishScriptVersion( @AuditRequestBody EsbManageScriptVersionV3Req request) { + + request.fillAppResourceScope(appScopeMappingService); scriptService.publishScript(request.getAppResourceScope().getAppId(), request.getUserName(), request.getScriptId(), request.getScriptVersionId()); ScriptDTO scriptVersion = scriptService.getScriptVersion(request.getScriptVersionId()); @@ -393,6 +399,8 @@ public EsbResp publishScriptVersion( @AuditEntry(actionId = ActionId.MANAGE_SCRIPT) public EsbResp updateScriptBasic( @AuditRequestBody EsbUpdateScriptBasicV3Req request) { + + request.fillAppResourceScope(appScopeMappingService); String userName = request.getUserName(); String scriptId = request.getScriptId(); AppResourceScope appResourceScope = request.getAppResourceScope(); @@ -411,6 +419,8 @@ public EsbResp updateScriptBasic( @AuditEntry(actionId = ActionId.MANAGE_SCRIPT) public EsbResp updateScriptVersion( @AuditRequestBody EsbUpdateScriptVersionV3Req request) { + + request.fillAppResourceScope(appScopeMappingService); ScriptDTO scriptVersionDTO = scriptDTOBuilder.buildFromCreateUpdateReq(request); scriptVersionDTO.setAppId(request.getAppResourceScope().getAppId()); scriptVersionDTO.setPublicScript(false);