diff --git a/rbac/check_perm.py b/rbac/check_perm.py index a915760..51515ee 100644 --- a/rbac/check_perm.py +++ b/rbac/check_perm.py @@ -43,7 +43,7 @@ def get_apikey_from_token(token): return None async def get_user_roles(userid): - sql = "select b.name from userrole a, role b where a.userid=${userid}$ and a.roleid = b.id" + sql = "select concat(b.orgtypeid, '.' b.name) as name from userrole a, role b where a.userid=${userid}$ and a.roleid = b.id" db = DBPools() roles = [] dbname = await get_dbname()