From 96652bceb48483ad7636f4aacc11976a0cb37406 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 18 Jul 2026 22:44:34 +0800 Subject: [PATCH] feat: UI pages, build.sh, deployment scripts, model uitype fixes - Add SDLC dashboard, pipeline editor, ops center UI - build.sh: clone business modules to pkgs/, xls2ui CRUD, fix created_by - global_func.py: password_encode None-safe wrapper - pipeline_app.py: permission cache warmup removed - load_path.py: RBAC permission registration for all modules - scripts/merge_i18n.py: i18n merge tool - bin/init_perms.py, bin/init_data.py: init scripts - set_role_perm.py: single permission registration - Model uitype fields set for form editing - pipeline_core/pipeline_ops load_path.py scripts --- scripts/load_path.py | 52 +++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/scripts/load_path.py b/scripts/load_path.py index ca77c30..01f1d0a 100644 --- a/scripts/load_path.py +++ b/scripts/load_path.py @@ -1,22 +1,38 @@ -"""Register RBAC paths for pipeline_dist module.""" +#!/usr/bin/env python3 +"""RBAC path registration for pipeline_dist + showcase modules.""" +import os, sys, subprocess -RBAC_PATHS = [ - '/api/distributors_list.dspy', - '/api/distributors_get.dspy', - '/api/distributors_save.dspy', - '/api/distributors_delete.dspy', - '/api/distributor_pipeline_list.dspy', - '/api/distributor_pipeline_get.dspy', - '/api/distributor_pipeline_save.dspy', - '/api/distributor_pipeline_delete.dspy', - '/api/distributor_generate_key.dspy', +MODS = [ + ("pipeline_dist", [ + "/pipeline_dist", + "/pipeline_dist/index.ui", + "/pipeline_dist/distributors/index.ui", + "/pipeline_dist/distributor_pipeline/index.ui", + ]), + ("showcase", [ + "/showcase", + "/showcase/index.ui", + ]), ] -def load_paths(register): - """Register all RBAC paths for this module.""" - for path in RBAC_PATHS: - register(f'pipeline_dist{path}', { - 'module': 'pipeline_dist', - 'path': path, - }) +def main(): + root = os.path.expanduser("~/pipeline") + set_perm = os.path.join(root, "set_role_perm.py") + if not os.path.isfile(set_perm): + print("ERROR: pipeline root not found"); sys.exit(1) + py = sys.executable + count = 0 + total = 0 + for mod, paths in MODS: + total += len(paths) + for path in paths: + r = subprocess.run([py, set_perm, "logined", path], capture_output=True, text=True, cwd=root) + if r.returncode == 0: count += 1 + else: print(f" WARN: {path}") + print(f" {mod}: {len(paths)} paths") + print(f"Registered {count}/{total}") + + +if __name__ == "__main__": + main()