Commit 0b93054c by zubair-arbi

Allow user to submit initial verification through reverify flow

ECOM-2933
parent 6a76db08
......@@ -1875,6 +1875,12 @@ class TestReverifyView(TestCase):
success = self.client.login(username=self.USERNAME, password=self.PASSWORD)
self.assertTrue(success, msg="Could not log in")
def test_reverify_view_can_do_initial_verification(self):
"""
Test that a User can use reverify link for initial verification.
"""
self._assert_can_reverify()
def test_reverify_view_can_reverify_denied(self):
# User has a denied attempt, so can reverify
attempt = SoftwareSecurePhotoVerification.objects.create(user=self.user)
......
......@@ -1358,10 +1358,12 @@ class ReverifyView(View):
"""
status, _ = SoftwareSecurePhotoVerification.user_status(request.user)
# If the verification process is still ongoing i.e. the status for photo
# verification is either 'submitted' or 'must_retry' then its marked as
# 'pending'
if status in ["must_reverify", "expired", "pending"]:
# If the user has no initial verification or if the verification
# process is still ongoing 'pending' or expired then allow the user to
# submit the photo verification.
# A photo verification is marked as 'pending' if its status is either
# 'submitted' or 'must_retry'.
if status in ["none", "must_reverify", "expired", "pending"]:
context = {
"user_full_name": request.user.profile.name,
"platform_name": settings.PLATFORM_NAME,
......
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