Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 作业模板-调试-去执行的申请权限跳转页Bad Request #2359 #2387

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading