Skip to content

Commit 4d38f67

Browse files
committed
Updated zoom host check to be more intuitive and coherent.
1 parent a642e10 commit 4d38f67

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

view.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
// Only show if the admin did not disable this feature completely.
152152
if (!$showrecreate && $config->showcapacitywarning == true) {
153153
// Only show if the user viewing this is the host.
154-
if ($userishost) {
154+
if ($userishost && $iszoommanager) {
155155
// Get meeting capacity.
156156
$meetingcapacity = zoom_get_meeting_capacity($zoom->host_id, $zoom->webinar);
157157

@@ -216,7 +216,7 @@
216216

217217
if ($available) {
218218
// Show join meeting button.
219-
if ($userishost) {
219+
if ($userishost && $iszoommanager) {
220220
$buttonhtml = html_writer::tag('button', $strstart, ['type' => 'submit', 'class' => 'btn btn-success']);
221221
} else {
222222
$btntext = $strjoin;
@@ -449,7 +449,7 @@
449449
// Get passcode information.
450450
$haspassword = (isset($zoom->password) && $zoom->password !== '');
451451
$strhaspass = ($haspassword) ? $stryes : $strno;
452-
$canviewjoinurl = ($userishost || has_capability('mod/zoom:viewjoinurl', $context));
452+
$canviewjoinurl = (($userishost && $iszoommanager) || has_capability('mod/zoom:viewjoinurl', $context));
453453

454454
// Show passcode status.
455455
$rowhaspass = new html_table_row();
@@ -583,7 +583,7 @@
583583
if (
584584
!$showrecreate
585585
&& ($zoom->option_audio === ZOOM_AUDIO_BOTH || $zoom->option_audio === ZOOM_AUDIO_TELEPHONY)
586-
&& ($userishost || has_capability('mod/zoom:viewdialin', $context))
586+
&& (($userishost && $iszoommanager) || has_capability('mod/zoom:viewdialin', $context))
587587
) {
588588
// Get meeting invitation from Zoom.
589589
$meetinginvite = zoom_webservice()->get_meeting_invitation($zoom)->get_display_string($cm->id);

0 commit comments

Comments
 (0)