浏览代码

[fix] disable twofactor

version-14
Rushabh Mehta 8 年前
父节点
当前提交
92403aabba
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      frappe/twofactor.py

+ 1
- 1
frappe/twofactor.py 查看文件

@@ -24,7 +24,7 @@ def toggle_two_factor_auth(state, roles=[]):

def two_factor_is_enabled(user=None):
'''Returns True if 2FA is enabled.'''
enabled = frappe.db.get_value('System Settings', None, 'enable_two_factor_auth')
enabled = int(frappe.db.get_value('System Settings', None, 'enable_two_factor_auth') or 0)
if not user or not enabled:
return enabled
return two_factor_is_enabled_for_(user)


正在加载...
取消
保存