wangwei 7 ani în urmă
părinte
comite
7d034a0c09

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

@@ -219,11 +219,11 @@ public class UserController extends ControllerSupport {
 	private Long insertOrUpdateUser(UserForm userForm) {
 		cn.com.qmth.examcloud.commons.web.security.bean.User accessUser = getAccessUser();
 		Long rootOrgId = userForm.getRootOrgId();
-		Org org = orgRepo.findOne(rootOrgId);
-		if (null == org) {
+		Org rootOrg = orgRepo.findOne(rootOrgId);
+		if (null == rootOrg) {
 			throw new StatusException("B-150003", "机构不存在");
 		}
-		if (0 != org.getParentId()) {
+		if (null != rootOrg.getParentId()) {
 			throw new StatusException("B-150004", "机构错误");
 		}
 

+ 1 - 1
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/StudentCloudServiceProvider.java

@@ -94,7 +94,7 @@ public class StudentCloudServiceProvider extends ControllerSupport implements St
 		if (null == rootOrg) {
 			throw new StatusException("B-150001", "机构不存在");
 		}
-		if (!rootOrg.getParentId().equals(0L)) {
+		if (null != rootOrg.getParentId()) {
 			throw new StatusException("B-150002", "机构错误");
 		}
 

+ 1 - 0
examcloud-core-basic-starter/src/main/resources/security-exclusions.conf

@@ -14,4 +14,5 @@ regexp:.*\[getLoginUser\].*
 [${$rmp.cloud.basic}demo][getXxx,getYYY][POST]
 [${$rmp.ctr.basic}/course][/export][GET]
 [${$rmp.ctr.basic}/specialty][/export][GET]
+[${$rmp.ctr.basic}/specialty][/download][GET]