Skip to content

fix(rap): hide every camera of a locked user in recordings - #25889

Merged
antobinary merged 2 commits into
bigbluebutton:v4.0.x-developfrom
germanocaumo:u40d/fix/webcam-lock-all-cameras
Oct 1, 2026
Merged

antobinary merged 2 commits into
bigbluebutton:v4.0.x-developfrom
germanocaumo:u40d/fix/webcam-lock-all-cameras

Conversation

@germanocaumo

@germanocaumo germanocaumo commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes how create_webcam_edl handles the "webcams only for moderator" lock. There's one commit per change.

  1. Every camera of a locked user is hidden. When the lock turns on, or a user is demoted or promoted under it, all of the user's cameras now move between the active and inactive lists instead of just one. extract_filename_from_userId returned a single filename (the last match). It's replaced by move_user_videos, which moves every camera whose get_id_from_filename matches the user. That's the same function the Start/Stop handlers use to decide whether a camera is locked. The old filename.match(userId) substring match is gone with it.
  2. The unused user_id is dropped from webcam EDL entries. Nothing reads it, which is why the role change and lock entries could tag webcams with the wrong user (or nil) unnoticed. It's removed from all five entry builders instead of being fixed.

Closes Issue(s)

None

Motivation

With show_moderator_viewpoint: false (the default), a viewer sharing two cameras while webcams are locked to moderators still had one of them in the recording.

How to test

  • Run ruby -Ilib -Itest test/recordandplayback/generators/test_events.rb in record-and-playback/core. The new test covers the lock turning on and off, and a promotion and a demotion under it, with users sharing two cameras each.
  • Or record a meeting where a viewer shares 2 cameras, lock webcams to moderators, and check the video/presentation webcams output: both of the viewer's cameras should disappear while the lock is on.

More

Same code on v3.0.x-release. Both commits cherry-pick there and the tests pass.

With "webcams only for moderator", create_webcam_edl moved only one
camera per user between the active and inactive lists, since
extract_filename_from_userId returns a single filename. A viewer's
other cameras still showed in the recording while the lock was on,
and the same happened when a user was demoted or promoted under the
lock.

Move all of the user's cameras instead, matching them by the same
get_id_from_filename used by the start and stop handlers.
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: e85979cd-a7e5-4c9e-977b-0dc11f7bc2bb

📥 Commits

Reviewing files that changed from the base of the PR and between f0e2feb and 92b91e0.

📒 Files selected for processing (2)
  • record-and-playback/core/lib/recordandplayback/generators/events.rb
  • record-and-playback/core/test/recordandplayback/generators/test_events.rb

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

The webcam EDL generator now moves every video whose parsed user ID matches the requested ID. Moderator-only filtering and role changes use this behavior. Role changes create an EDL entry only when at least one video moves. Webcam EDL area entries no longer include user_id. A new test checks camera visibility across webcam-lock and role-change events.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: kepstin

Merge Risk: ⚪ Minimal · up to 92b91

This change fixes a recording bug where one of a viewer's two cameras could stay visible while webcams were locked. No merge-blocking risk is evident from the supplied context.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 92b91

The change strengthens recording privacy by hiding every matching camera when moderator-only restrictions apply. No introduced security regression was verified. Production event-ordering and filename guarantees, and compatibility with outside integrations, remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated security effect concerns participant camera visibility in a meeting's generated recording. The inspected path does not demonstrate new cross-meeting access or increased service privileges; authority to alter archived events was not established.

Trust Boundaries and Controls

  • observed — The recording processor reads archived events.xml. Recorded roles, policy events, and camera filenames supply the identity and policy inputs that determine which tracks reach rendering. Authentication and integrity guarantees for those archived inputs were outside the inspected scope.
  • observed — The caller defaults to the filtered viewpoint. The explicit moderator-viewpoint branch includes cameras without moderator-only filtering; that pre-existing mode was not introduced by this fix.

Resilience and Maintainability Implications

  • inferred — Visibility transitions mutate per-call in-memory lists, and the caller starts rendering only after reconstruction returns. An interruption during those transitions therefore does not hand a partially reconstructed list to this caller; persistent output recovery and publication atomicity remain unverified.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: hiding every camera of a locked user in recordings.
Description check ✅ Passed The description directly explains the camera-lock fix, the implementation change, the removed field, and the test coverage.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🧪 Generate unit tests (beta)
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Nothing reads the user_id set on the webcams of an EDL entry, which is
why the role change and lock entries could tag them with the wrong user
without anyone noticing. Remove it instead of fixing it.
@germanocaumo
germanocaumo force-pushed the u40d/fix/webcam-lock-all-cameras branch from f0e2feb to 92b91e0 Compare October 1, 2026 11:16
@germanocaumo
germanocaumo requested a review from kepstin October 1, 2026 11:18
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

🚨 Automated tests failed

@kepstin

kepstin commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@antobinary This change is also suitable for being backported to 3.0 (a privacy fix - viewer webcams might be visible when they should be hidden)

@antobinary
antobinary merged commit b494e1f into bigbluebutton:v4.0.x-develop Oct 1, 2026
32 of 34 checks passed
@antobinary antobinary mentioned this pull request Oct 1, 2026
12 of 14 tasks
@antobinary antobinary added this to the Release 4.0 milestone Oct 1, 2026
antobinary added a commit that referenced this pull request Oct 1, 2026
…eras-30

[3.0 port] fix(rap): hide every camera of a locked user in recordings- #25889
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants