From b8024f75c5361814e0af6fb8751c93c4a0999a48 Mon Sep 17 00:00:00 2001 From: Liu Rui Date: Sun, 15 Dec 2024 10:59:57 +0800 Subject: [PATCH] =?UTF-8?q?fix-AuthorizationController-=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E6=A8=A1=E5=9D=97=E6=B2=A1=E6=9C=89=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E8=A1=A8=E5=AF=BC=E8=87=B4=E8=B5=8B=E6=9D=83=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyun/platform/controller/AuthorizationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java index f18181a..ceb550e 100644 --- a/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java +++ b/muyun-platform/src/main/java/net/ximatai/muyun/platform/controller/AuthorizationController.java @@ -188,7 +188,6 @@ private String getDefaultDataAuth(String actionID) { private boolean testDataAuth(String actionID, String dataAuth, String customCondition) { Map actionMap = actionCache.get(actionID); String module = actionMap.get("v_alias_at_app_module").toString(); - String tableName = actionMap.get("v_table").toString(); String authCondition = null; if ("custom".equals(dataAuth)) { @@ -197,6 +196,7 @@ private boolean testDataAuth(String actionID, String dataAuth, String customCond authCondition = authorizationService.dictDataAuthToCondition(muYunConfig.superUserId(), module, dataAuth); } try { + String tableName = actionMap.get("v_table").toString(); getDB().row("select 1 from %s where 1=1 and %s limit 1".formatted(tableName, authCondition)); return true; } catch (Exception e) {