diff --git a/json/organization.json b/json/organization.json index 6e6f649..66e312a 100644 --- a/json/organization.json +++ b/json/organization.json @@ -6,9 +6,28 @@ "title":"Organization", "params": { "sortby":"orgname", + "editor":{ + "binds":[ + { + "wid":"province_id", + "event":"changed", + "actiontype":"script", + "target":"city_id", + "script":"this.loadData({cond:'parentid=\\''+params.province_id+'\\''})" + }, + { + "wid":"city_id", + "event":"changed", + "actiontype":"script", + "target":"distinct_id", + "script":"this.loadData({cond:'parentid=\\'' + params.city_id+ '\\''})" + } + ] + }, "browserfields": { "exclouded": ["id"], - "cwidth": {} + "alters": { + } }, "editexclouded": [ "id" diff --git a/models/organization.xlsx b/models/organization.xlsx index b32643f..b43bd8b 100644 Binary files a/models/organization.xlsx and b/models/organization.xlsx differ diff --git a/rbac/check_perm.py b/rbac/check_perm.py index 3324a06..1978369 100644 --- a/rbac/check_perm.py +++ b/rbac/check_perm.py @@ -88,7 +88,7 @@ async def create_user(sor, ns, roles=[]): for rt in roles: sql = "select * from role where orgtypeid = ${otid}$ and name in ${roles}$)" recs = await sor.sqlExe(sql, { - 'otid': rt['orgtypeid', + 'otid': rt['orgtypeid'], 'roles': rt['roles'] }) for r in recs: diff --git a/script/setroleperms.sh b/script/setroleperms.sh index 085c9a8..5e435d3 100644 --- a/script/setroleperms.sh +++ b/script/setroleperms.sh @@ -1,7 +1,7 @@ #!/usr/bin/bash -python -m rbac/set_role_perms sage rbac owner superuser role permission rolepermission user user role organizationorgtypes -python -m rbac/set_role_perms sage rbac owner admin user userrole -python -m rbac/set_role_perms sage rbac customer admin user userrole -python -m rbac/set_role_perms sage rbac reseller admin user userrole +python -m rbac.set_role_perms sage rbac owner superuser role permission rolepermission user user role organizationorgtypes +python -m rbac.set_role_perms sage rbac owner admin user userrole +python -m rbac.set_role_perms sage rbac customer admin user userrole +python -m rbac.set_role_perms sage rbac reseller admin user userrole