Beispiel #1
0
def two_factor_auth_enabled(user):
    return config.ENABLE_TWO_FACTOR_AUTH and user_has_device(user)
Beispiel #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)
Beispiel #3
0
 def test(user):
     return user.is_verified() or (if_configured and user.is_authenticated() and not user_has_device(user))
Beispiel #4
0
 def test(user):
     return user.is_verified() or (if_configured and user.is_authenticated
                                   and not user_has_device(user))