Commit 78f4e5a8 authored by ibuler's avatar ibuler

[Update] 修改用户Opt

parent 3193c554
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment