fix: otp 绑定问题

This commit is contained in:
xinwen
2021-09-16 18:59:15 +08:00
committed by 老广
parent c26ca20ad8
commit b375cd3e75
3 changed files with 80 additions and 71 deletions

View File

@@ -685,6 +685,10 @@ class User(AuthMixin, TokenMixin, RoleMixin, MFAMixin, AbstractUser):
def is_feishu_bound(self):
return bool(self.feishu_id)
@property
def is_otp_secret_key_bound(self):
return bool(self.otp_secret_key)
def get_absolute_url(self):
return reverse('users:user-detail', args=(self.id,))