From 915adb2fd3b101db11498a48101d1161ad64de61 Mon Sep 17 00:00:00 2001 From: Jiajun Liu Date: Fri, 3 Jul 2015 23:06:58 +0800 Subject: [PATCH] fix user can not get permission applies bug --- jperm/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jperm/views.py b/jperm/views.py index 4f38f09b9..ec7f58d56 100644 --- a/jperm/views.py +++ b/jperm/views.py @@ -268,7 +268,7 @@ def sudo_ldap_add(user_group, user_runas, asset_groups_select, ldap_conn = LDAPMgmt(LDAP_HOST_URL, LDAP_BASE_DN, LDAP_ROOT_DN, LDAP_ROOT_PW) else: return - + assets = [] cmds = [] user_runas = user_runas.split(',') @@ -751,7 +751,7 @@ def perm_apply_log(request, offset): header_title, path1, path2 = u'权限申请记录', u'权限管理', u'申请记录' keyword = request.GET.get('keyword', '') user_id = get_session_user_info(request)[0] - username = User.objects.get(id=user_id).name + username = User.objects.get(id=user_id).username dept_name = get_session_user_info(request)[4] status_dic = {'online': 0, 'offline': 1} status = status_dic[offset]