Skip to content

Commit

Permalink
fix: 作业模板-调试-去执行的申请权限跳转页Bad Request #2359
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu096 committed Aug 28, 2023
1 parent 89b467a commit cbe641d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ public Response<Long> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
* 资源范围下查看作业模板批量鉴权
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Long> batchAuthViewJobTemplate(String username,
AppResourceScope appResourceScope,
Expand Down

0 comments on commit cbe641d

Please sign in to comment.