- 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
39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
#!/usr/bin/env python3
|
|
"""RBAC path registration for pipeline_dist + showcase modules."""
|
|
import os, sys, subprocess
|
|
|
|
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 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()
|