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

[two-factor-auth]modify variable name

This commit is contained in:
zming
2017-09-04 18:06:40 +08:00
parent e851d031af
commit 4a9b657680
2 changed files with 11 additions and 11 deletions

View File

@@ -675,12 +675,12 @@ def user_info(request, email):
else:
g.role = _('Member')
_default_device = False
_has_two_factor_auth = has_two_factor_auth()
if _has_two_factor_auth:
default_device = False
bool_has_two_factor_auth = has_two_factor_auth()
if bool_has_two_factor_auth:
from seahub_extra.two_factor.utils import default_device
_user = User.objects.get(email=email)
_default_device = default_device(_user)
user = User.objects.get(email=email)
default_device = default_device(user)
return render_to_response(
'sysadmin/userinfo.html', {
@@ -695,8 +695,8 @@ def user_info(request, email):
'user_shared_links': user_shared_links,
'enable_sys_admin_view_repo': ENABLE_SYS_ADMIN_VIEW_REPO,
'personal_groups': personal_groups,
'two_factor_auth_enabled': _has_two_factor_auth,
'default_device': _default_device,
'two_factor_auth_enabled': bool_has_two_factor_auth,
'default_device': default_device,
}, context_instance=RequestContext(request))
@login_required_ajax