VC/Zoom: Warn on deletion if user is not the host

This commit is contained in:
Adrian Moennich 2020-12-03 11:17:56 +01:00
parent ac27a6475c
commit 0de73f3e2f
3 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,7 @@
- Always show the full join link and passcode to event managers
- The meeting passcode can be restricted to registered participants
- Show "Make me host" button in the management area and in contributions/sessions as well
- Warn the user if they delete a Zoom meeting linked to multiple events if they aren't the host
**Breaking change:** The email domains are now stored as a list of strings instead of a comma-separated list. You need to update them in the plugin settings.

View File

@ -189,6 +189,12 @@ class ZoomPlugin(VCPluginMixin, IndicoPlugin):
form.password.data = gen_random_password()
return form
def get_extra_delete_msg(self, vc_room, event_vc_room):
host = principal_from_identifier(vc_room.data['host'])
if host == session.user or len(vc_room.events) <= 1:
return ''
return render_plugin_template('vc_zoom:extra_delete_msg.html', host=host.full_name)
def _extend_indico_cli(self, sender, **kwargs):
return cli

View File

@ -0,0 +1,7 @@
<p style="margin-top: 1em;">
{% trans %}
The host of this Zoom meeting is <strong>{{ host }}</strong>. In case you want
to delete this Zoom meeting from all events, please make sure that they do not
use it for other events that may still need it!
{% endtrans %}
</p>