From 13de060c9ccae9f36c77c4ccb4496dc7384f567e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=85=A8?= Date: Fri, 29 Mar 2019 14:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=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 b909ce1..710f593 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': list(obj.get_all_permissions()), + 'access': list(obj.get_all_permissions())+['admin'] if obj.is_superuser else list(obj.get_all_permissions()), 'token': token, 'avatar': 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png' }