Private
Public Access
Allow toggling room privacy after creation (#48)
is_private was previously only settable at room creation. RoomUpdate now
accepts it, update_room() applies it, and PATCH /api/rooms/{id} allows a
site admin to make the change even for a room they haven't joined (in
addition to the existing room owner/admin gate) -- require_room_role
normally 403s a non-member before the role check ever runs, so this is a
deliberate bypass for site admins specifically.
Flipping the flag has no effect on existing members either direction
(confirmed is_private is only ever checked at self-serve join time) --
it purely controls Browse Rooms visibility and future self-joins.
Frontend: RoomInfoPanel's "Room settings" section is now visible to room
owner, room admin, or site admin (was owner-only), with a privacy toggle
reusing NewRoomModal's existing toggle-switch UI. "Delete room" stays
owner-only, now nested inside that wider section rather than gating the
whole thing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54932c9c03
commit
84dc99d1a1
6 files changed
+100
-9
No files matched your search
@@ -31,7 +31,7 @@ export function createRoom(
|
||||
|
||||
export function updateRoom(
|
||||
roomId: string,
|
||||
data: { name?: string; description?: string },
|
||||
data: { name?: string; description?: string; is_private?: boolean },
|
||||
): Promise<Room> {
|
||||
return apiFetch<Room>(`/api/rooms/${roomId}`, {
|
||||
method: 'PATCH',
|
||||
|
||||
Reference in new issue
Block a user