Skip to content

Commit

Permalink
restrict room types for rooms.membersOrderedByRole
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinav Kumar <[email protected]>
  • Loading branch information
abhinavkrin committed Jan 15, 2025
1 parent 3b0a10e commit 89ea1e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/meteor/app/api/server/v1/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,10 @@ API.v1.addRoute(
return API.v1.notFound('The required "roomId" or "roomName" param provided does not match any room');
}

if (findResult.t !== 'c' && findResult.t !== 'p') {
return API.v1.failure('error-room-type-not-supported');
}

if (findResult.broadcast && !(await hasPermissionAsync(this.userId, 'view-broadcast-member-list', findResult._id))) {
return API.v1.unauthorized();
}
Expand Down

0 comments on commit 89ea1e5

Please sign in to comment.