From 4af4bf292a327a437f5b84cc53a32dcedf0a6157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=85=A8?= Date: Fri, 29 Mar 2019 11:26:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/views.py b/system/views.py index 11e9252..19d7720 100644 --- a/system/views.py +++ b/system/views.py @@ -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' }