Parcourir la source

自定义数据权限不排除重复

RuoYi il y a 3 ans
Parent
commit
d4930f6a88

+ 1 - 1
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/GlobalException.java

@@ -7,7 +7,6 @@ package com.ruoyi.common.core.exception;
7
  */
7
  */
8
 public class GlobalException extends RuntimeException
8
 public class GlobalException extends RuntimeException
9
 {
9
 {
10
-
11
     private static final long serialVersionUID = 1L;
10
     private static final long serialVersionUID = 1L;
12
 
11
 
13
     /**
12
     /**
@@ -45,6 +44,7 @@ public class GlobalException extends RuntimeException
45
         return this;
44
         return this;
46
     }
45
     }
47
 
46
 
47
+    @Override
48
     public String getMessage()
48
     public String getMessage()
49
     {
49
     {
50
         return message;
50
         return message;

+ 1 - 0
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/exception/ServiceException.java

@@ -49,6 +49,7 @@ public final class ServiceException extends RuntimeException
49
         return detailMessage;
49
         return detailMessage;
50
     }
50
     }
51
 
51
 
52
+    @Override
52
     public String getMessage()
53
     public String getMessage()
53
     {
54
     {
54
         return message;
55
         return message;

+ 1 - 1
ruoyi-common/ruoyi-common-datascope/src/main/java/com/ruoyi/common/datascope/aspect/DataScopeAspect.java

@@ -92,7 +92,7 @@ public class DataScopeAspect
92
         for (SysRole role : user.getRoles())
92
         for (SysRole role : user.getRoles())
93
         {
93
         {
94
             String dataScope = role.getDataScope();
94
             String dataScope = role.getDataScope();
95
-            if (conditions.contains(dataScope))
95
+            if (!DATA_SCOPE_CUSTOM.equals(dataScope) && conditions.contains(dataScope))
96
             {
96
             {
97
                 continue;
97
                 continue;
98
             }
98
             }