Skip to content

Commit dbb0221

Browse files
committed
fix email restricted function
1 parent d125ddd commit dbb0221

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/src/middleware/request_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ def is_user_email_restricted() -> bool:
111111
if not isinstance(request_context, RequestContext):
112112
return True # Default to restricted
113113
email = get_request_context().user_email
114-
unrestricted_domains = ["@mobilitydata.org"]
114+
unrestricted_domains = ["mobilitydata.org"]
115115
return not email or not any(email.endswith(f"@{domain}") for domain in unrestricted_domains)

api/tests/unittest/middleware/test_request_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ def test_is_user_email_restricted(self):
9595
]
9696
request_context = RequestContext(scope=scope_instance)
9797
_request_context.set(request_context)
98-
self.assertTrue(is_user_email_restricted())
98+
self.assertFalse(is_user_email_restricted())

0 commit comments

Comments
 (0)