瀏覽代碼

magic-api

fanxp 1 月之前
父節點
當前提交
2055b22850
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      src/main/java/com/xjrsoft/common/interceptor/MagicApiRequestInterceptor.java

+ 5 - 6
src/main/java/com/xjrsoft/common/interceptor/MagicApiRequestInterceptor.java

@@ -2,7 +2,6 @@ package com.xjrsoft.common.interceptor;
 
 import cn.dev33.satoken.session.SaSession;
 import cn.dev33.satoken.stp.StpUtil;
-import cn.dev33.satoken.strategy.SaStrategy;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.enums.ResponseCode;
 import com.xjrsoft.common.model.result.R;
@@ -41,11 +40,11 @@ public class MagicApiRequestInterceptor implements RequestInterceptor {
             roleIds = tokenSession.get(GlobalConstant.LOGIN_USER_ROLE_ID_KEY, new ArrayList<>());
         }
         //非管理员需要进行权限验证
-        if (!roleIds.contains(GlobalConstant.SUPER_ADMIN_ROLE_ID)) {
-            if (!SaStrategy.me.hasElement.apply(tokenSession.get(GlobalConstant.LOGIN_USER_INTERFACE_AUTH_CODE_KEY, new ArrayList<>()), requestEntity.getApiInfo().getId())) {
-                return R.error(ResponseCode.MAGIC_API_UN_AUTHORIZED.getCode(), ResponseCode.MAGIC_API_UN_AUTHORIZED.getMessage());
-            }
-        }
+//        if (!roleIds.contains(GlobalConstant.SUPER_ADMIN_ROLE_ID)) {
+//            if (!SaStrategy.me.hasElement.apply(tokenSession.get(GlobalConstant.LOGIN_USER_INTERFACE_AUTH_CODE_KEY, new ArrayList<>()), requestEntity.getApiInfo().getId())) {
+//                return R.error(ResponseCode.MAGIC_API_UN_AUTHORIZED.getCode(), ResponseCode.MAGIC_API_UN_AUTHORIZED.getMessage());
+//            }
+//        }
         return null;
     }