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.
This commit is contained in:
Lauryn Menard 2022-10-10 13:23:18 +02:00 committed by Tim Abbott
parent 6423bbe26f
commit 2e23318872
1 changed files with 2 additions and 1 deletions

View File

@ -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,