mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 02:48:00 +00:00
auth: Set valid_attestation more unconditionally in social auth.
This commit is contained in:
@@ -431,7 +431,7 @@ class GitHubAuthBackendTest(ZulipTestCase):
|
||||
|
||||
kwargs = {'realm': get_realm('zulip'),
|
||||
'response': response,
|
||||
'return_data': {}}
|
||||
'return_data': {'valid_attestation': True}}
|
||||
result.assert_called_with(self.user_profile, 'fake-access-token', **kwargs)
|
||||
|
||||
def test_github_backend_do_auth_for_default_auth_failed(self):
|
||||
@@ -461,7 +461,7 @@ class GitHubAuthBackendTest(ZulipTestCase):
|
||||
|
||||
kwargs = {'realm': get_realm('zulip'),
|
||||
'response': response,
|
||||
'return_data': {}}
|
||||
'return_data': {'valid_attestation': True}}
|
||||
result.assert_called_with(self.user_profile, 'fake-access-token', **kwargs)
|
||||
|
||||
def test_github_backend_do_auth_for_team_auth_failed(self):
|
||||
@@ -491,7 +491,7 @@ class GitHubAuthBackendTest(ZulipTestCase):
|
||||
|
||||
kwargs = {'realm': get_realm('zulip'),
|
||||
'response': response,
|
||||
'return_data': {}}
|
||||
'return_data': {'valid_attestation': True}}
|
||||
result.assert_called_with(self.user_profile, 'fake-access-token', **kwargs)
|
||||
|
||||
def test_github_backend_do_auth_for_org_auth_failed(self):
|
||||
|
||||
@@ -206,8 +206,8 @@ class SocialAuthMixin(ZulipAuthMixin):
|
||||
try:
|
||||
user_profile = get_user_profile_by_email(email_address)
|
||||
except UserProfile.DoesNotExist:
|
||||
return_data["valid_attestation"] = True
|
||||
return None
|
||||
return_data["valid_attestation"] = True
|
||||
|
||||
if not user_profile.is_active:
|
||||
return_data["inactive_user"] = True
|
||||
|
||||
Reference in New Issue
Block a user