Fix permissions issue and role hoists

This commit is contained in:
Jeremy Zhang
2018-07-18 00:38:37 +00:00
parent 86c7232b35
commit 6cd27f2aff
4 changed files with 12 additions and 35 deletions

View File

@ -65,7 +65,8 @@ def get_formatted_user(user):
}
roles = sorted(user.roles, key=lambda k: k.position, reverse=True)
for role in roles:
userobj["roles"].append(role.id)
userobj["roles"].append(str(role.id))
print(role, role.hoist)
if role.hoist and userobj["hoist-role"] == None:
userobj["hoist-role"] = {
"id": str(role.id),