WANG 5 năm trước cách đây
mục cha
commit
6af53117fc

+ 3 - 2
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/OrgController.java

@@ -647,9 +647,11 @@ public class OrgController extends ControllerSupport {
 		String fileSuffix = ".json";
 
 		String filePath = systemConfig.getTempDataDir() + File.separator + "orgProperties"
-				+ File.separator + orgId + fileSuffix;
+				+ File.separator + propertyGroupId + "_" + orgId + fileSuffix;
+		filePath = PathUtil.getCanonicalPath(filePath);
 		File file = new File(filePath);
 		String prettyJson = JsonUtil.toPrettyJson(properties);
+
 		try {
 			FileUtils.write(file, prettyJson, "UTF-8");
 
@@ -680,7 +682,6 @@ public class OrgController extends ControllerSupport {
 		if (null == orgEntity) {
 			throw new StatusException("001250", "orgId is wrong");
 		}
-		validateRootOrgIsolation(orgEntity.getRootId());
 
 		String key = SystemProps.ORG_PROPERTY_GROUP_PREFIX + propertyGroupId;