Compare commits

..

No commits in common. "f066bdd9608dc52622c1c3f1e2cb5b5fe6472974" and "4db0b2c715e1a1c10656d3d6386547055de5f695" have entirely different histories.

5 changed files with 0 additions and 182 deletions

View File

@ -1,40 +0,0 @@
{
"summary": [
{
"name": "appcodes",
"title": "应用编码表",
"primary": [
"id"
]
}
],
"fields": [
{
"name": "id",
"title": "id",
"type": "str",
"length": 32
},
{
"name": "name",
"title": "编码名称",
"type": "str",
"length": 255
},
{
"name": "hierarchy_flg",
"title": "多级标志",
"type": "str",
"length": 1
}
],
"codes": [
{
"field": "hierarchy_flg",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='code_hierarchy'"
}
]
}

View File

@ -1,54 +0,0 @@
{
"summary": [
{
"name": "appcodes_kv",
"title": "编码键值表",
"primary": [
"id"
]
}
],
"fields": [
{
"name": "id",
"title": "id",
"type": "str",
"length": 32
},
{
"name": "parentid",
"title": "父id",
"type": "str",
"length": 32
},
{
"name": "k",
"title": "键",
"type": "str",
"length": 32
},
{
"name": "v",
"title": "值",
"type": "str",
"length": 255
}
],
"indexes": [
{
"name": "idx1",
"idxtype": "unique",
"idxfields": [
"parentid",
"k"
]
},
{
"name": "idx2",
"idxtype": "index",
"idxfields": [
"parentid"
]
}
]
}

View File

@ -1,31 +0,0 @@
{
"summary": [
{
"name": "params",
"title": "参数表",
"primary": [
"id"
]
}
],
"fields": [
{
"name": "id",
"title": "id",
"type": "str",
"length": 32
},
{
"name": "params_name",
"title": "参数名称",
"type": "str",
"length": 255
},
{
"name": "params_value",
"title": "参数值",
"type": "str",
"length": 4000
}
]
}

View File

@ -1,25 +0,0 @@
{
"summary": [
{
"name": "svgicon",
"title": "图标",
"primary": [
"id"
],
"catelog": "entity"
}
],
"fields": [
{
"name": "id",
"title": "id",
"type": "str",
"length": 32
},
{
"name": "icon",
"title": "svg内容",
"type": "text"
}
]
}

View File

@ -1,32 +0,0 @@
"""
appbase 模块 RBAC 权限注册脚本
执行方式: cd ~/repos/sage && ./py3/bin/python ../appbase/scripts/load_path.py
"""
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from rbac.rbac import set_path_perm
PERMISSIONS = [
# appbase 主页面
{'path': '/appbase', 'permtype': 'logined', 'method': 'any'},
# UI 页面
{'path': '/appbase/menu.ui', 'permtype': 'logined', 'method': 'any'},
{'path': '/appbase/cron/index.ui', 'permtype': 'logined', 'method': 'any'},
# DSPY 接口
{'path': '/appbase/get_code.dspy', 'permtype': 'logined', 'method': 'any'},
{'path': '/appbase/get_appcodes_kv.dspy', 'permtype': 'logined', 'method': 'any'},
{'path': '/appbase/show_icon.dspy', 'permtype': 'logined', 'method': 'any'},
{'path': '/appbase/cron/switch_bizdate.dspy', 'permtype': 'logined', 'method': 'any'},
]
async def main():
for perm in PERMISSIONS:
await set_path_perm(perm['path'], perm['permtype'], method=perm['method'])
print(f"OK: {perm['path']} -> {perm['permtype']}")
if __name__ == '__main__':
import asyncio
asyncio.run(main())