fix(接口测试): 修复接口报告删除判断所属权限问题

--bug=1033726 --user=王孝刚 【接口测试】测试报告-操作-删除场景和用例报告失败 https://www.tapd.cn/55049933/s/1446706
This commit is contained in:
wxg0103 2023-12-21 10:27:04 +08:00 committed by Craftsman
parent 1516d97201
commit e41c091300
1 changed files with 6 additions and 14 deletions

View File

@ -38,21 +38,13 @@ public class ApiCheckPermissionService {
}
MSException.throwException(Translator.get("check_owner_report"));
}
if (scenarioReport != null) {
if (!projectIds.contains(scenarioReport.getProjectId())) {
MSException.throwException(Translator.get("check_owner_report"));
}
if (SessionUtils.hasPermission(null, scenarioReport.getProjectId(), permissionId)) {
MSException.throwException(Translator.get("check_owner_report"));
}
if (scenarioReport != null && (!projectIds.contains(scenarioReport.getProjectId()) ||
!SessionUtils.hasPermission(null, scenarioReport.getProjectId(), permissionId))) {
MSException.throwException(Translator.get("check_owner_report"));
}
if (apiReport != null) {
if (!projectIds.contains(apiReport.getProjectId())) {
MSException.throwException(Translator.get("check_owner_report"));
}
if (SessionUtils.hasPermission(null, apiReport.getProjectId(), permissionId)) {
MSException.throwException(Translator.get("check_owner_report"));
}
if (apiReport != null && (!projectIds.contains(apiReport.getProjectId()) ||
!SessionUtils.hasPermission(null, apiReport.getProjectId(), permissionId))) {
MSException.throwException(Translator.get("check_owner_report"));
}
}