mcp-dbutils 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_dbutils/base.py +9 -3
- {mcp_dbutils-1.0.1.dist-info → mcp_dbutils-1.0.2.dist-info}/METADATA +1 -1
- {mcp_dbutils-1.0.1.dist-info → mcp_dbutils-1.0.2.dist-info}/RECORD +6 -6
- {mcp_dbutils-1.0.1.dist-info → mcp_dbutils-1.0.2.dist-info}/WHEEL +0 -0
- {mcp_dbutils-1.0.1.dist-info → mcp_dbutils-1.0.2.dist-info}/entry_points.txt +0 -0
- {mcp_dbutils-1.0.1.dist-info → mcp_dbutils-1.0.2.dist-info}/licenses/LICENSE +0 -0
mcp_dbutils/base.py
CHANGED
@@ -625,6 +625,9 @@ class ConnectionServer:
|
|
625
625
|
# 没有细粒度权限控制,默认允许所有写操作
|
626
626
|
return
|
627
627
|
|
628
|
+
# 将表名转换为小写,用于大小写不敏感的比较
|
629
|
+
table_name_lower = table_name.lower()
|
630
|
+
|
628
631
|
# 检查表级权限
|
629
632
|
tables = write_permissions.get("tables", {})
|
630
633
|
if not tables:
|
@@ -638,9 +641,12 @@ class ConnectionServer:
|
|
638
641
|
operation=operation_type, table=table_name
|
639
642
|
))
|
640
643
|
|
641
|
-
#
|
642
|
-
|
643
|
-
|
644
|
+
# 创建表名到配置的映射,支持大小写不敏感的比较
|
645
|
+
tables_lower = {k.lower(): v for k, v in tables.items()}
|
646
|
+
|
647
|
+
# 检查特定表的权限(大小写不敏感)
|
648
|
+
if table_name_lower in tables_lower:
|
649
|
+
table_config = tables_lower[table_name_lower]
|
644
650
|
operations = table_config.get("operations", ["INSERT", "UPDATE", "DELETE"])
|
645
651
|
if operation_type in operations:
|
646
652
|
return
|
@@ -1,6 +1,6 @@
|
|
1
1
|
mcp_dbutils/__init__.py,sha256=6LLccQv7je2L4IpY_I3OzSJZcK32VUDJv2IY31y6eYg,1900
|
2
2
|
mcp_dbutils/audit.py,sha256=U-Fd511HxOQH4BxfCXgd4KyaBLESEBnGsPkUNviSTwc,7294
|
3
|
-
mcp_dbutils/base.py,sha256=
|
3
|
+
mcp_dbutils/base.py,sha256=2KhuovVvSUHV664ppLy1LO4a-CfN2rBF-BrP6eHzIb4,61907
|
4
4
|
mcp_dbutils/config.py,sha256=zwN9yPKv4WvEPG3WIRT6uBVZSRxFniSmN2kEog7KPcI,5921
|
5
5
|
mcp_dbutils/log.py,sha256=mqxi6I_IL-MF1F_pxBtnYZQKOHbGBJ74gsvZHVelr1w,823
|
6
6
|
mcp_dbutils/stats.py,sha256=wMqWPfGnEOg9v5YBtTsARV-1YsFUMM_pKdzitzSU9x4,7137
|
@@ -16,8 +16,8 @@ mcp_dbutils/sqlite/__init__.py,sha256=fK_3-WylCBYpBAzwuopi8hlwoIGJm2TPAlwcPWG46I
|
|
16
16
|
mcp_dbutils/sqlite/config.py,sha256=rsfAE8yaCVZC39ziXssqsi0EXUOEWA-MtKHvrO-6jG4,4933
|
17
17
|
mcp_dbutils/sqlite/handler.py,sha256=vpkyCow26hpBqigNUNW0VGyWhsTz8uFflssM7K-FJi4,21882
|
18
18
|
mcp_dbutils/sqlite/server.py,sha256=EBKNKz_wTvChwg6BZlvZIBA1H5mmE2NiNEMOgu_CMy4,7373
|
19
|
-
mcp_dbutils-1.0.
|
20
|
-
mcp_dbutils-1.0.
|
21
|
-
mcp_dbutils-1.0.
|
22
|
-
mcp_dbutils-1.0.
|
23
|
-
mcp_dbutils-1.0.
|
19
|
+
mcp_dbutils-1.0.2.dist-info/METADATA,sha256=hZm7hYfZKEzyNJmYCFNPvdXq0JNkJVOj4IJDbfOuihE,8440
|
20
|
+
mcp_dbutils-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
21
|
+
mcp_dbutils-1.0.2.dist-info/entry_points.txt,sha256=XTjt0QmYRgKOJQT6skR9bp1EMUfIrgpHeZJPZ3CJffs,49
|
22
|
+
mcp_dbutils-1.0.2.dist-info/licenses/LICENSE,sha256=1A_CwpWVlbjrKdVEYO77vYfnXlW7oxcilZ8FpA_BzCI,1065
|
23
|
+
mcp_dbutils-1.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|