WANG 6 yıl önce
ebeveyn
işleme
bf3598d11d

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

@@ -26,6 +26,7 @@ import cn.com.qmth.examcloud.core.basic.service.StudentService;
 import cn.com.qmth.examcloud.core.basic.service.bean.LoginInfo;
 import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import cn.com.qmth.examcloud.web.redis.RedisClient;
+import cn.com.qmth.examcloud.web.support.ApiId;
 import cn.com.qmth.examcloud.web.support.ControllerSupport;
 import cn.com.qmth.examcloud.web.support.Naked;
 import cn.com.qmth.examcloud.web.support.StatusResponseX;
@@ -33,6 +34,9 @@ import cn.com.qmth.examcloud.web.support.WithoutStackTrace;
 import io.swagger.annotations.ApiOperation;
 
 /**
+ * {@link StatusException} 状态码范围:002XXX<br>
+ * {@link ApiId}范围: 200-299<br>
+ * 
  * 鉴权
  *
  * @author WANGWEI

+ 5 - 1
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -53,7 +53,7 @@ import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
 import cn.com.qmth.examcloud.web.redis.RedisClient;
 
 /**
- * 类注释
+ * {@link StatusException} 状态码范围:003XXX<br>
  *
  * @author WANGWEI
  * @date 2018年5月25日
@@ -183,6 +183,10 @@ public class AuthServiceImpl implements AuthService {
 			}
 		}
 
+		if (!rootOrg.getEnable()) {
+			throw new StatusException("003001", "顶级机构被禁用");
+		}
+
 		String accessibleRootOrgIds = (String) systemPropertyService
 				.get("ACCESSIBLE_ROOT_ORG_LIST");
 		if (StringUtils.isNotBlank(accessibleRootOrgIds)) {