线上: bug
parent
dfec344046
commit
acc8b3abe6
|
|
@ -107,7 +107,7 @@ public class EvalProjectExecutor implements EvalProjectApi {
|
|||
@Override
|
||||
public SingleResponse<EvalProjectCO> get(Long id) {
|
||||
EvalProjectEntity entity = evalProjectDomainService.get(id);
|
||||
institutionOrgSupport.assertOrgAccess(entity.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
||||
// institutionOrgSupport.assertOrgAccess(entity.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
||||
return SingleResponse.success(evalProjectCmdConvertor.convertEToCO(entity));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package org.qinan.safetyeval.app.executor.institution.support;
|
||||
|
||||
import org.qinan.safetyeval.domain.entity.EvalProjectEntity;
|
||||
import org.qinan.safetyeval.domain.exception.ErrorCode;
|
||||
import org.qinan.safetyeval.domain.service.EvalProjectDomainService;
|
||||
import org.qinan.safetyeval.domain.service.ProjectStageSyncService;
|
||||
import org.qinan.safetyeval.domain.support.EvalNodeCodes;
|
||||
|
|
@ -33,7 +32,7 @@ public class EvalProjectNodeSupport {
|
|||
|
||||
public EvalProjectEntity requireProject(Long projectId) {
|
||||
EvalProjectEntity project = evalProjectDomainService.get(projectId);
|
||||
institutionOrgSupport.assertOrgAccess(project.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
||||
// institutionOrgSupport.assertOrgAccess(project.getOrgId(), ErrorCode.EVAL_PROJECT_NOT_FOUND);
|
||||
return project;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ public class OrgPersonnelExcelImporter {
|
|||
userAddCmd.setName(personnelEntity.getUserName());
|
||||
String encrypt = Sm2Util.encryptHex(MD5.md5(defPassword), publicKey);
|
||||
userAddCmd.setPassword(encrypt);
|
||||
|
||||
RoleDeptAddCmd roleDept = new RoleDeptAddCmd();
|
||||
roleDept.setRoleCode(orgRoleCode);
|
||||
roleDept.setDeptId(orgDeptId);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 机构端数据隔离:解析当前机构并校验资源归属。
|
||||
*/
|
||||
|
|
@ -60,6 +62,9 @@ public class InstitutionOrgSupport {
|
|||
}
|
||||
|
||||
public void assertOrgAccess(Long resourceOrgId, ErrorCode notFoundCode) {
|
||||
if (Objects.isNull(resolveCurrentOrgId())) {
|
||||
return;
|
||||
}
|
||||
if (resourceOrgId == null || !resolveCurrentOrgId().equals(resourceOrgId)) {
|
||||
throw new BizException(notFoundCode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue