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 = [
|
||||
'/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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user