diff --git a/vc_zoom/README.md b/vc_zoom/README.md
index 01478bf..2b0b2d8 100644
--- a/vc_zoom/README.md
+++ b/vc_zoom/README.md
@@ -18,6 +18,8 @@
- Allow using the same name for multiple Zoom rooms
- Update the join url when changing the passcode
- Provide an alternative method of looking up the Zoom user corresponding to an Indico user
+- Always show the full join link and passcode to event managers
+- The meeting passcode can be restricted to registered participants
**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.
diff --git a/vc_zoom/indico_vc_zoom/forms.py b/vc_zoom/indico_vc_zoom/forms.py
index 2f95ee8..36436f0 100644
--- a/vc_zoom/indico_vc_zoom/forms.py
+++ b/vc_zoom/indico_vc_zoom/forms.py
@@ -22,7 +22,6 @@ from indico.web.forms.validators import HiddenUnless, IndicoRegexp
from indico.web.forms.widgets import SwitchWidget
from indico_vc_zoom import _
-from indico_vc_zoom.api.client import ZoomIndicoClient
from indico_vc_zoom.util import find_enterprise_email
@@ -33,6 +32,7 @@ class VCRoomAttachForm(VCRoomAttachFormBase):
choices=[
('everyone', _('Everyone')),
('logged_in', _('Logged-in users')),
+ ('registered', _('Registered participants')),
('no_one', _('No one'))])
@@ -66,6 +66,7 @@ class VCRoomForm(VCRoomFormBase):
choices=[
('everyone', _('Everyone')),
('logged_in', _('Logged-in users')),
+ ('registered', _('Registered participants')),
('no_one', _('No one'))])
mute_audio = BooleanField(_('Mute audio'),
diff --git a/vc_zoom/indico_vc_zoom/templates/buttons.html b/vc_zoom/indico_vc_zoom/templates/buttons.html
index f64fcc5..bbe2157 100644
--- a/vc_zoom/indico_vc_zoom/templates/buttons.html
+++ b/vc_zoom/indico_vc_zoom/templates/buttons.html
@@ -14,9 +14,11 @@
{% endif %}
{% endmacro %}
-{% macro render_join_button(vc_room, event_vc_room, extra_classes="", is_manager=false) %}
- {% if event_vc_room.data.password_visibility == 'everyone' or is_manager or
- (session.user and event_vc_room.data.password_visibility == 'logged_in') %}
+{% macro render_join_button(vc_room, event_vc_room, extra_classes='') %}
+ {% 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)) %}
+ {% elif event_vc_room.data.password_visibility == 'registered' %}
+ {% if session.user %}
+ {% if event_vc_room.event.type == 'conference' %}
+
+ {% else %}
+
+ {% endif %}
+ {% else %}
+
+ {% endif %}
{% else %}