2 Commits a24a34802e ... 009f480d94

Author SHA1 Message Date
  fanxp 009f480d94 Merge remote-tracking branch 'origin/dev' into dev 1 month ago
  fanxp 2055b22850 magic-api 1 month ago

+ 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;
     }