Browse Source

修复scope类型错误

zhou-hao 5 years ago
parent
commit
bf2bd1e796

+ 1 - 4
hsweb-system/hsweb-system-organizational/hsweb-system-organizational-authorization/src/main/java/org/hswebframework/web/organizational/authorization/simple/ScopeByUserDataAccessConfig.java

@@ -23,7 +23,7 @@ public class ScopeByUserDataAccessConfig extends AbstractDataAccessConfig implem
 
     private String scopeTypeName;
 
-    private Set<String> scope;
+    private Set<Object> scope;
 
     private boolean children;
 
@@ -42,8 +42,5 @@ public class ScopeByUserDataAccessConfig extends AbstractDataAccessConfig implem
         return obj instanceof ScopeByUserDataAccessConfig && obj.hashCode() == hashCode();
     }
 
-    public Set<Object> getScope(){
-        return ((Set) scope);
-    }
 
 }

+ 3 - 3
hsweb-system/hsweb-system-organizational/hsweb-system-organizational-authorization/src/main/java/org/hswebframework/web/organizational/authorization/simple/handler/ScopeByUserHandler.java

@@ -130,7 +130,7 @@ public class ScopeByUserHandler implements DataAccessHandler {
     @SneakyThrows
     private ScopeInfo getScope(ScopeByUserDataAccessConfig config, PersonnelAuthentication authentication) {
         String termType = null, personTermType = "in";
-        Set<String> scope = null, allScope = null;
+        Set<?> scope = null, allScope = null;
         ScopeInfo scopeInfo = new ScopeInfo();
         if (authentication == null) {
             return scopeInfo;
@@ -226,8 +226,8 @@ public class ScopeByUserHandler implements DataAccessHandler {
         String termType;
         String personTermType;
 
-        List<String> scope;
-        List<String> allScope;
+        List<?> scope;
+        List<?> allScope;
 
         Consumer<Query<?, QueryParamEntity>> notUserConsumer;