wangwei 6 lat temu
rodzic
commit
c3214536f9

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

@@ -692,6 +692,14 @@ public class OrgController extends ControllerSupport {
 	@PostMapping("importLogo/{orgId}")
 	public void importLogo(@PathVariable Long orgId, HttpServletRequest request,
 			@RequestParam CommonsMultipartFile file) throws IOException {
+
+		OrgEntity orgEntity = orgRepo.findOne(orgId);
+		if (null == orgEntity) {
+			throw new StatusException("B-140002", "orgEntity is null");
+		}
+
+		validateRootOrgIsolation(orgEntity.getRootId());
+
 		String schoolLogoPath = PropertiesUtil.getString(PropKeys.SCHOOL_LOGO_PATH);
 		if (StringUtils.isBlank(schoolLogoPath)) {
 			FileUtils.forceMkdir(new File(schoolLogoPath));