shiqian пре 4 година
родитељ
комит
702ae94631

+ 1 - 1
boman-web-core/src/main/java/com/boman/web/core/service/TableServiceCmdService.java

@@ -259,7 +259,7 @@ public class TableServiceCmdService {
         // 查询条件
         JSONObject condition = ifNullSetEmpty(fixedData.getJSONObject(CONDITION));
         // 权限
-        checkQueryListAuth(genTable, condition);
+        checkAuthQueryList(genTable, condition);
         // 检查列
         checkColumn(condition, columns);
         // 封装好以后的查询条件

+ 6 - 6
boman-web-core/src/main/java/com/boman/web/core/utils/AuthUtils.java

@@ -34,17 +34,17 @@ public class AuthUtils {
     private static final Logger LOGGER = LoggerFactory.getLogger(AuthUtils.class);
 
     public static boolean checkAuthObjectDelete(GenTable genTable, Long id, String pkName) {
-        String tableName = genTable.getTableName();
         String functionName = genTable.getFunctionName();
+        if (!containsFunctionBool(genTable.getMenuRole(), GenTable.D, functionName)) {
+            return false;
+        }
+
+        String tableName = genTable.getTableName();
         LoginUser loginUser = getLoginUser();
         if (SysUser.isAdmin(loginUser.getUserid())) {
             return true;
         }
 
-        if (!containsFunctionBool(genTable.getMenuRole(), GenTable.D, functionName)) {
-            return false;
-        }
-
         if (!checkPermsAuthBool(tableName, GenTable.D)) {
             return false;
         }
@@ -52,7 +52,7 @@ public class AuthUtils {
         return checkRoleDataAuthBool(tableName, pkName, id);
     }
 
-    public static void checkQueryListAuth(GenTable genTable, JSONObject condition) {
+    public static void checkAuthQueryList(GenTable genTable, JSONObject condition) {
         containsFunction(genTable.getMenuRole(), GenTable.Q, "此模块:[" + genTable.getTableName() + "], 没有查询功能");
 
         LoginUser loginUser = getLoginUser();