|
@@ -22,6 +22,7 @@ import cn.com.qmth.examcloud.commons.web.security.RequestPermissionInterceptor;
|
|
import cn.com.qmth.examcloud.commons.web.security.SpringCloudInterceptor;
|
|
import cn.com.qmth.examcloud.commons.web.security.SpringCloudInterceptor;
|
|
import cn.com.qmth.examcloud.commons.web.security.bean.Role;
|
|
import cn.com.qmth.examcloud.commons.web.security.bean.Role;
|
|
import cn.com.qmth.examcloud.commons.web.security.bean.User;
|
|
import cn.com.qmth.examcloud.commons.web.security.bean.User;
|
|
|
|
+import cn.com.qmth.examcloud.commons.web.security.bean.UserType;
|
|
import cn.com.qmth.examcloud.commons.web.security.enums.RoleMeta;
|
|
import cn.com.qmth.examcloud.commons.web.security.enums.RoleMeta;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -62,6 +63,13 @@ public class DefaultWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean hasPermission(String mappingPath, User user) {
|
|
public boolean hasPermission(String mappingPath, User user) {
|
|
|
|
+
|
|
|
|
+ // 学生鉴权
|
|
|
|
+ if (user.getUserType().equals(UserType.STUDENT)) {
|
|
|
|
+ String key = " [s]" + mappingPath;
|
|
|
|
+ return PropertiesUtil.getBoolean(key, false);
|
|
|
|
+ }
|
|
|
|
+
|
|
List<Role> roleList = user.getRoleList();
|
|
List<Role> roleList = user.getRoleList();
|
|
|
|
|
|
if (CollectionUtils.isEmpty(roleList)) {
|
|
if (CollectionUtils.isEmpty(roleList)) {
|