fix: init_any_permissions.py 添加根路径 / 权限
RBAC检查原始请求路径,访问根路径时检查的是 '/' 而非 'index.ui'。 数据库需要有 '/' 路径的权限记录。
This commit is contained in:
parent
15a0d4b8bb
commit
8c5cb3fe3f
@ -132,6 +132,8 @@ if os.path.isdir(wwwroot_root):
|
|||||||
root_paths.append("/api/" + f)
|
root_paths.append("/api/" + f)
|
||||||
|
|
||||||
print(f"--- wwwroot/ → / ({len(root_paths)} 个文件) ---")
|
print(f"--- wwwroot/ → / ({len(root_paths)} 个文件) ---")
|
||||||
|
# 确保根路径 / 也有权限(访问根路径时RBAC检查的是 '/' 而非 index.ui)
|
||||||
|
root_paths.append("/")
|
||||||
n1 = set_any_perms(root_paths)
|
n1 = set_any_perms(root_paths)
|
||||||
|
|
||||||
# 2. wwwroot/dingdingflow/ → /dingdingflow/
|
# 2. wwwroot/dingdingflow/ → /dingdingflow/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user