1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 02:48:51 +00:00

[sysadmin] update user admin page

This commit is contained in:
lian
2016-08-08 14:03:07 +08:00
parent 0ba90fb72a
commit 06022c3109
2 changed files with 30 additions and 11 deletions

View File

@@ -190,6 +190,14 @@ def sys_user_admin(request):
else:
trial_users = []
for user in users:
user_profile = Profile.objects.get_profile_by_user(user.email)
if user_profile:
user.contact_email = user_profile.contact_email
user.name = user_profile.nickname
else:
user.contact_email = ''
user.name = ''
if user.email == request.user.email:
user.is_self = True
@@ -1452,6 +1460,14 @@ def user_search(request):
for user in users:
_populate_user_quota_usage(user)
user_profile = Profile.objects.get_profile_by_user(user.email)
if user_profile:
user.contact_email = user_profile.contact_email
user.name = user_profile.nickname
else:
user.contact_email = ''
user.name = ''
# check user's role
if user.role == GUEST_USER:
user.is_guest = True