VC/Zoom: Fail gracefully if co-host has no zoom account

This commit is contained in:
Adrian Moennich 2021-01-11 10:36:31 +01:00
parent f5b8dca1cc
commit 323e0935be
2 changed files with 15 additions and 8 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-01-05 13:20+0100\n"
"POT-Creation-Date: 2021-01-11 10:36+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -270,32 +270,36 @@ msgid ""
"session block which were not automatically updated."
msgstr ""
#: indico_vc_zoom/util.py:42
#: indico_vc_zoom/util.py:45
msgid "All emails"
msgstr ""
#: indico_vc_zoom/util.py:43
#: indico_vc_zoom/util.py:46
msgid "Email domains"
msgstr ""
#: indico_vc_zoom/util.py:44
#: indico_vc_zoom/util.py:47
msgid "Authenticators"
msgstr ""
#: indico_vc_zoom/util.py:124
#: indico_vc_zoom/util.py:127
msgid "This room has been deleted from Zoom"
msgstr ""
#: indico_vc_zoom/util.py:128
#: indico_vc_zoom/util.py:131
msgid ""
"Problem fetching room from Zoom. Please contact support if the error "
"persists."
msgstr ""
#: indico_vc_zoom/util.py:147
#: indico_vc_zoom/util.py:150
msgid "Can't update meeting. Please contact support if the error persists."
msgstr ""
#: indico_vc_zoom/util.py:206
msgid "Could not find Zoom user for alternative host"
msgstr ""
#: indico_vc_zoom/templates/buttons.html:9
msgid "You will become an alternative host of this Zoom meeting"
msgstr ""

View File

@ -201,4 +201,7 @@ def process_alternative_hosts(emails):
def get_alt_host_emails(identifiers):
"""Convert a list of identities into a list of enterprise e-mails."""
return [find_enterprise_email(principal_from_identifier(ident)) for ident in identifiers]
emails = [find_enterprise_email(principal_from_identifier(ident)) for ident in identifiers]
if None in emails:
raise VCRoomError(_('Could not find Zoom user for alternative host'))
return emails