[Update] 修改用户Opt

pull/1185/head
ibuler 7 years ago
parent 3193c5549d
commit 78f4e5a89a

@ -211,6 +211,12 @@ class User(AbstractUser):
def otp_enabled(self):
return self.otp_level > 0
def enabled_otp(self):
self.otp_level = 1
def force_enable_otp(self):
self.otp_level = 2
@property
def otp_force_enabled(self):
return self.otp_level == 2

Loading…
Cancel
Save