fix: init_any_permissions.py 添加根路径 / 权限

RBAC检查原始请求路径,访问根路径时检查的是 '/' 而非 'index.ui'。
数据库需要有 '/' 路径的权限记录。
This commit is contained in:
yumoqing 2026-06-03 17:13:36 +08:00
parent 15a0d4b8bb
commit 8c5cb3fe3f

View File

@ -132,6 +132,8 @@ if os.path.isdir(wwwroot_root):
root_paths.append("/api/" + f)
print(f"--- wwwroot/ → / ({len(root_paths)} 个文件) ---")
# 确保根路径 / 也有权限访问根路径时RBAC检查的是 '/' 而非 index.ui
root_paths.append("/")
n1 = set_any_perms(root_paths)
# 2. wwwroot/dingdingflow/ → /dingdingflow/