|
@@ -1422,9 +1422,20 @@ public class ExamController extends ControllerSupport {
|
|
|
public Boolean faceCheckEnabled(@PathVariable Long examId) {
|
|
|
ExamSettingsCacheBean examSettings = CacheHelper.getExamSettings(examId);
|
|
|
|
|
|
+ return faceCheckEnabled(examSettings.getRootOrgId(), examId);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断是否有人脸识别权限
|
|
|
+ *
|
|
|
+ * @author WANGWEI
|
|
|
+ * @param rootOrgId
|
|
|
+ * @param examId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private Boolean faceCheckEnabled(Long rootOrgId, Long examId) {
|
|
|
String faceCheck = PrivilegeDefine.RootOrgFunctions.OnlineExamFunctions.FaceCheck.CODE;
|
|
|
- Boolean hasFaceCheckFunction = PrivilegeManager.judge(examSettings.getRootOrgId(),
|
|
|
- faceCheck);
|
|
|
+ Boolean hasFaceCheckFunction = PrivilegeManager.judge(rootOrgId, faceCheck);
|
|
|
|
|
|
ExamPropertyCacheBean examConf = CacheHelper.getExamProperty(examId, "IS_FACE_ENABLE");
|
|
|
String examValue = examConf.getValue();
|
|
@@ -1449,6 +1460,11 @@ public class ExamController extends ControllerSupport {
|
|
|
public Boolean identificationOfLivingEnabled(@PathVariable Long examId) {
|
|
|
ExamSettingsCacheBean examSettings = CacheHelper.getExamSettings(examId);
|
|
|
|
|
|
+ Boolean faceCheckEnabled = faceCheckEnabled(examSettings.getRootOrgId(), examId);
|
|
|
+ if (!faceCheckEnabled) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
String IdentificationOfLivingBody = PrivilegeDefine.RootOrgFunctions.OnlineExamFunctions.IdentificationOfLivingBody.CODE;
|
|
|
Boolean hasIdentificationOfLivingBodyFunction = PrivilegeManager
|
|
|
.judge(examSettings.getRootOrgId(), IdentificationOfLivingBody);
|