8 lines
670 B
Python
8 lines
670 B
Python
#!/usr/bin/env python3
|
|
import sys, pathlib, json
|
|
runtime=pathlib.Path(sys.argv[1] if len(sys.argv)>1 else '.').resolve(); (runtime/'.aios_patch_manifests').mkdir(exist_ok=True)
|
|
conf=runtime/'webops'/'config'; conf.mkdir(parents=True,exist_ok=True)
|
|
(conf/'role_model.active.json').write_text(json.dumps({'roles':['owner','admin','user'],'legacy_role_mapping':{'ultra':'owner','pro':'admin','regular':'user'},'rule':'active runtime authorization must use owner/admin/user only'},ensure_ascii=False,indent=2),encoding='utf-8')
|
|
(runtime/'AIOS_ACTIVE_ROLE_MODEL_OWNER_ADMIN_USER').write_text('owner/admin/user\n',encoding='utf-8')
|
|
print('ROLE_CONVERGENCE_PATCH_OK', runtime)
|