Fix green room Go live and Panels hidden for conference hosts.
Deploy Ladill Meet / deploy (push) Successful in 34s
Deploy Ladill Meet / deploy (push) Successful in 34s
Stop registerPresenter from demoting hosts to panelists, recognize room owners as managers, and show stage controls in the green room banner. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -356,7 +356,16 @@ class MeetingFeaturesController extends Controller
|
||||
protected function hostOnly(Request $request, Session $session): Participant
|
||||
{
|
||||
$participant = $this->participant($request, $session);
|
||||
abort_unless($participant->isHost(), 403);
|
||||
$user = $request->user();
|
||||
$isRoomHost = $user && $user->ownerRef() === $session->room->host_user_ref;
|
||||
|
||||
abort_unless($participant->isHost() || $isRoomHost, 403);
|
||||
|
||||
if ($isRoomHost && ! $participant->isHost()) {
|
||||
$participant->update(['role' => 'host']);
|
||||
|
||||
return $participant->fresh();
|
||||
}
|
||||
|
||||
return $participant;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@ class MeetingRoomController extends Controller
|
||||
$spaces = app(SpaceService::class);
|
||||
$isAudioOnly = $room->isAudioOnly();
|
||||
$stageLayout = app(StageLayoutService::class);
|
||||
$authUser = $request->user();
|
||||
$isRoomHost = $authUser && $authUser->ownerRef() === $room->host_user_ref;
|
||||
$canManageConference = $participant->isHost() || $isRoomHost;
|
||||
|
||||
return view('meet.room.show', [
|
||||
'session' => $session,
|
||||
@@ -90,6 +93,7 @@ class MeetingRoomController extends Controller
|
||||
'isAttendee' => $participant->isAttendee() || $spaces->isListener($room, $participant),
|
||||
'usesStageLayout' => $stageLayout->usesStageLayout($room),
|
||||
'stageConfig' => $stageLayout->config($room),
|
||||
'canManageConference' => $canManageConference,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +108,12 @@ class SessionService
|
||||
$updates['joined_at'] = $existing->joined_at ?? now();
|
||||
}
|
||||
|
||||
if (in_array($role, ['host', 'co_host'], true)) {
|
||||
$updates['role'] = $role;
|
||||
} elseif ($existing->role === 'guest' && $role !== 'guest') {
|
||||
$updates['role'] = $role;
|
||||
}
|
||||
|
||||
$existing->update($updates);
|
||||
|
||||
return $existing;
|
||||
|
||||
@@ -103,6 +103,7 @@ class TownHallService
|
||||
$session->participants()
|
||||
->where('user_ref', $userRef)
|
||||
->where('status', 'joined')
|
||||
->whereNotIn('role', ['host', 'co_host'])
|
||||
->update(['role' => 'panelist']);
|
||||
|
||||
return $session->fresh();
|
||||
|
||||
Reference in New Issue
Block a user