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
This commit is contained in:
parent
5aa80a6132
commit
96652bceb4
@ -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 = [
|
MODS = [
|
||||||
'/api/distributors_list.dspy',
|
("pipeline_dist", [
|
||||||
'/api/distributors_get.dspy',
|
"/pipeline_dist",
|
||||||
'/api/distributors_save.dspy',
|
"/pipeline_dist/index.ui",
|
||||||
'/api/distributors_delete.dspy',
|
"/pipeline_dist/distributors/index.ui",
|
||||||
'/api/distributor_pipeline_list.dspy',
|
"/pipeline_dist/distributor_pipeline/index.ui",
|
||||||
'/api/distributor_pipeline_get.dspy',
|
]),
|
||||||
'/api/distributor_pipeline_save.dspy',
|
("showcase", [
|
||||||
'/api/distributor_pipeline_delete.dspy',
|
"/showcase",
|
||||||
'/api/distributor_generate_key.dspy',
|
"/showcase/index.ui",
|
||||||
|
]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def load_paths(register):
|
def main():
|
||||||
"""Register all RBAC paths for this module."""
|
root = os.path.expanduser("~/pipeline")
|
||||||
for path in RBAC_PATHS:
|
set_perm = os.path.join(root, "set_role_perm.py")
|
||||||
register(f'pipeline_dist{path}', {
|
if not os.path.isfile(set_perm):
|
||||||
'module': 'pipeline_dist',
|
print("ERROR: pipeline root not found"); sys.exit(1)
|
||||||
'path': path,
|
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()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user