修改权限

This commit is contained in:
何全
2019-03-29 11:26:28 +08:00
parent fac6fd52e3
commit 4af4bf292a

View File

@@ -34,7 +34,7 @@ class UserInfo(APIView):
result = {
'name': obj.username,
'user_id': obj.id,
'access': ['super_admin', 'admin'] if obj.is_superuser else [],
'access': list(obj.get_all_permissions()),
'token': token,
'avator': 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
}