From 2e23318872dd211f7711c724bb82e0a9a0e660e3 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Mon, 10 Oct 2022 13:23:18 +0200 Subject: [PATCH] communities: Include orgs without invite or email domain restrictions. Updates the organizations listed in the open communities directory to also include organizations that do not require an invite and do not restrict email domains for new users to join the organization. --- corporate/views/portico.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/corporate/views/portico.py b/corporate/views/portico.py index 1f69b05ac5..1011d9f15f 100644 --- a/corporate/views/portico.py +++ b/corporate/views/portico.py @@ -115,7 +115,8 @@ def communities_view(request: HttpRequest) -> HttpResponse: want_advertise_in_communities_directory=True ).order_by("name") for realm in want_to_be_advertised_realms: - if realm.allow_web_public_streams_access(): + open_to_public = not realm.invite_required and not realm.emails_restricted_to_domains + if realm.allow_web_public_streams_access() or open_to_public: eligible_realms.append( { "id": realm.id,