Merge branch '2.3-maintenance'

This commit is contained in:
Adrian Moennich 2021-03-02 14:45:21 +01:00
commit fad61d31cd
3 changed files with 31 additions and 11 deletions

View File

@ -16,6 +16,8 @@
- Fix deleting Zoom meetings that were already deleted on the Zoom side when running outside a web request context (e.g. during scheduled deletion of events)
- Fix overwriting co-hosts added via the Zoom client when using "make me co-host" in Indico
- Always refresh data from Zoom before editing via Indico to avoid saving with stale data
- Add option to link to an external page with phone-in instructions
- Fix showing the zoom join link in the info box
### 2.3b2

View File

@ -11,8 +11,9 @@ from requests.exceptions import HTTPError
from sqlalchemy.orm.attributes import flag_modified
from wtforms.fields import TextAreaField
from wtforms.fields.core import BooleanField
from wtforms.fields.html5 import URLField
from wtforms.fields.simple import StringField
from wtforms.validators import DataRequired, ValidationError
from wtforms.validators import DataRequired, Optional, URL, ValidationError
from indico.core import signals
from indico.core.auth import multipass
@ -43,7 +44,7 @@ class PluginSettingsForm(VCPluginSettingsFormBase):
_fieldsets = [
(_('API Credentials'), ['api_key', 'api_secret', 'webhook_token']),
(_('Zoom Account'), ['user_lookup_mode', 'email_domains', 'authenticators', 'enterprise_domain',
'allow_webinars']),
'allow_webinars', 'phone_link']),
(_('Room Settings'), ['mute_audio', 'mute_host_video', 'mute_participant_video', 'join_before_host',
'waiting_room']),
(_('Notifications'), ['creation_email_footer', 'send_host_url', 'notification_emails']),
@ -112,6 +113,9 @@ class PluginSettingsForm(VCPluginSettingsFormBase):
description=_('Whether to send an e-mail with the Host URL to the meeting host upon '
'creation of a meeting'))
phone_link = URLField(_('Join via phone'), [Optional(), URL()],
description=_('Link to the list of VidyoVoice phone numbers'))
def validate_authenticators(self, field):
invalid = set(field.data) - set(multipass.identity_providers)
if invalid:
@ -143,7 +147,8 @@ class ZoomPlugin(VCPluginMixin, IndicoPlugin):
'join_before_host': True,
'waiting_room': False,
'creation_email_footer': None,
'send_host_url': False
'send_host_url': False,
'phone_link': '',
})
def init(self):

View File

@ -1,6 +1,13 @@
{% from '_clipboard_input.html' import clipboard_input %}
{% set host = vc_room.data.host %}
{% set alt_hosts = vc_room.data.alternative_hosts %}
{% set phone_link = settings.get('phone_link') %}
{% set passcode_visible = (
event_vc_room.data.password_visibility == 'everyone' or
event_vc_room.event.can_manage(session.user) or
(session.user and event_vc_room.data.password_visibility == 'logged_in') or
(session.user and event_vc_room.data.password_visibility == 'registered' and event_vc_room.event.is_user_registered(session.user))
) %}
<dl>
<dt>{% trans %}Zoom Meeting ID{% endtrans %}</dt>
<dd>{{ vc_room.data.zoom_id }}</dd>
@ -24,17 +31,23 @@
{{ alt_hosts | map('decodeprincipal') | map(attribute='full_name') | join(', ') }}
</dd>
{% endif %}
{% if event_vc_room.data.password_visibility == 'everyone' or
event_vc_room.event.can_manage(session.user) or
(session.user and event_vc_room.data.password_visibility == 'logged_in') or
(session.user and event_vc_room.data.password_visibility == 'registered' and event_vc_room.event.is_user_registered(session.user)) %}
{% if passcode_visible %}
<dt>{% trans %}Passcode{% endtrans %}</dt>
<dd>{{ vc_room.data.password }}</dd>
{% endif %}
{% if event_vc_room.data.show_autojoin %}
<dt class="large-row">{% trans %}Zoom URL{% endtrans %}</dt>
<dd class="large-row">
{{ clipboard_input(vc_room.data.url, name="vc-room-url-%s"|format(event_vc_room.id)) }}
{% if phone_link %}
<dt>
{% trans %}Useful links{% endtrans %}
</dt>
<dd>
<a href="{{ phone_link }}" target="_blank">
{% trans %}Join via phone{% endtrans %}
</a>
</dd>
{% endif %}
<dt class="large-row">{% trans %}Zoom URL{% endtrans %}</dt>
<dd class="large-row">
{{ clipboard_input(vc_room.data.url if passcode_visible else vc_room.data.public_url,
name="vc-room-url-%s"|format(event_vc_room.id)) }}
</dd>
</dl>