Skip to content

Commit

Permalink
fix-AuthorizationController-修正因为模块没有对应表导致赋权报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
aruis committed Dec 15, 2024
1 parent 2444c8d commit b8024f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ private String getDefaultDataAuth(String actionID) {
private boolean testDataAuth(String actionID, String dataAuth, String customCondition) {
Map<String, Object> 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)) {
Expand All @@ -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) {
Expand Down

0 comments on commit b8024f7

Please sign in to comment.