diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebTaskPlanResourceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebTaskPlanResourceImpl.java index 5fc2d8c260..f70abcd381 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebTaskPlanResourceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/impl/WebTaskPlanResourceImpl.java @@ -455,7 +455,8 @@ public Response savePlan(String username, AuthResult authResult; if (planId > 0) { if (planService.isDebugPlan(appResourceScope.getAppId(), templateId, planId)) { - authResult = templateAuthService.authDebugJobTemplate(username, appResourceScope, templateId); + // 调试作业模版会保存一份内置的执行方案;从用户角度来说仍然还是在处理跟模版相关的操作,所以使用模版查看鉴权 + authResult = templateAuthService.authViewJobTemplate(username, appResourceScope, templateId); } else { authResult = planAuthService.authEditJobPlan(username, appResourceScope, templateId, planId, null); diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/TemplateAuthService.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/TemplateAuthService.java index b1f103b22e..02ca79ab3d 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/TemplateAuthService.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/TemplateAuthService.java @@ -80,18 +80,6 @@ AuthResult authDeleteJobTemplate(String username, AppResourceScope appResourceScope, Long jobTemplateId); - /** - * 资源范围下调试作业模板鉴权 - * - * @param username 用户名 - * @param appResourceScope 资源范围 - * @param jobTemplateId 作业模板ID - * @return 鉴权结果 - */ - AuthResult authDebugJobTemplate(String username, - AppResourceScope appResourceScope, - Long jobTemplateId); - /** * 资源范围下查看作业模板批量鉴权 * diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/impl/TemplateAuthServiceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/impl/TemplateAuthServiceImpl.java index d2408aa32e..693149646c 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/impl/TemplateAuthServiceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/auth/impl/TemplateAuthServiceImpl.java @@ -107,19 +107,6 @@ public AuthResult authDeleteJobTemplate(String username, ); } - @Override - public AuthResult authDebugJobTemplate(String username, - AppResourceScope appResourceScope, - Long jobTemplateId) { - return authService.auth( - username, - ActionId.DEBUG_JOB_TEMPLATE, - ResourceTypeEnum.TEMPLATE, - jobTemplateId.toString(), - buildAppScopePath(appResourceScope) - ); - } - @Override public List batchAuthViewJobTemplate(String username, AppResourceScope appResourceScope,