示例#1
0
def two_factor_auth_enabled(user):
    return config.ENABLE_TWO_FACTOR_AUTH and user_has_device(user)
示例#2
0
 def get(self, request, *args, **kwargs):
     if not user_has_device(self.request.user):
         return HttpResponseRedirect(reverse('edit_profile'))
     return super(DisableView, self).get(request, *args, **kwargs)
示例#3
0
 def test(user):
     return user.is_verified() or (if_configured and user.is_authenticated() and not user_has_device(user))
示例#4
0
 def test(user):
     return user.is_verified() or (if_configured and user.is_authenticated
                                   and not user_has_device(user))