Repository navigation
Fix(akka): Add Disable feature support for plugins - #24909
Conversation
WalkthroughThe changes address a bug where the Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
There was a problem hiding this comment.
Pull request overview
This PR makes disabledFeatures=plugins take effect by preventing plugin manifests from being parsed/fetched when plugins are disabled for a meeting.
Changes:
- Skip plugin manifest processing in
ParamsProcessorUtilwhendisabledFeaturescontainsplugins. - Skip plugin manifest fetching in
MeetingService.createMeetingwhendisabledFeaturescontainsplugins.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java | Stops building plugin manifest list when plugins are disabled. |
| bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java | Avoids fetching plugin manifests when plugins are disabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Map<String, Object> pluginsMap; | ||
| ArrayList<Object> sharedNotesInitialContentMap = getSharedNotesInitialContent(m); | ||
| if (m.isBreakout()) { | ||
| if (m.isBreakout() || m.getDisabledFeatures().contains("plugins")) { |
There was a problem hiding this comment.
When disabledFeatures includes plugins, this branch assigns pluginsMap = plugins (the method argument). For breakout rooms, plugins is propagated from the parent (message.pluginProp) and may be non-empty, so plugins can still be enabled even though the meeting explicitly disables them. Consider handling plugins disable as an overriding condition: if plugins are disabled, set pluginsMap to an empty map (and skip fetching), otherwise keep the current breakout/normal behavior.
| if (m.isBreakout() || m.getDisabledFeatures().contains("plugins")) { | |
| if (m.getDisabledFeatures().contains("plugins")) { | |
| pluginsMap = new HashMap<>(); | |
| } else if (m.isBreakout()) { |
| // Parse Plugins Manifests from config and param | ||
| ArrayList<PluginManifest> listOfPluginManifests = new ArrayList<PluginManifest>(); | ||
| if (!isBreakout){ | ||
| if (!isBreakout && !listOfDisabledFeatures.contains("plugins")){ |
There was a problem hiding this comment.
This change adds new behavior (skipping plugin manifest parsing when disabledFeatures contains plugins) but there doesn’t appear to be any automated coverage for ParamsProcessorUtil.processCreateParams. Consider adding a unit test to assert that disabledFeatures=plugins results in an empty pluginManifests list (and, end-to-end, that MeetingService.createMeeting does not fetch/populate plugins).
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java (1)
575-579:⚠️ Potential issue | 🟠 MajorDon’t reuse the caller-provided plugin map when plugins are disabled.
Line 575 currently treats
isBreakout()anddisabledFeatures=pluginsas the same branch. InprocessCreateBreakoutRoom()this overload is still called withmessage.pluginProp(Line 936) after disabled features are propagated (Line 919), so a breakout with plugins disabled will still inherit and expose those plugins.Suggested fix
- if (m.isBreakout() || m.getDisabledFeatures().contains("plugins")) { - pluginsMap = plugins; - } else { - pluginsMap = requestPluginManifests(m); - } + if (m.getDisabledFeatures().contains("plugins")) { + pluginsMap = new HashMap<>(); + } else if (m.isBreakout()) { + pluginsMap = plugins; + } else { + pluginsMap = requestPluginManifests(m); + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java` around lines 575 - 579, The code currently conflates m.isBreakout() with m.getDisabledFeatures().contains("plugins") and reuses the caller-provided plugins map (plugins / message.pluginProp) even when plugins were disabled; update the branching so that a breakout room only inherits the caller plugin map when plugins are not disabled, and when disabledFeatures contains "plugins" do not reuse the provided map (use an empty/no-plugins result instead) rather than calling requestPluginManifests; locate this in MeetingService where pluginsMap is assigned (refer to pluginsMap, requestPluginManifests(), isBreakout(), getDisabledFeatures(), processCreateBreakoutRoom(), and message.pluginProp) and implement the conditional split: breakout-with-plugins -> inherit caller map, disabled-plugins -> no plugins, otherwise -> requestPluginManifests(m).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java`:
- Around line 575-579: The code currently conflates m.isBreakout() with
m.getDisabledFeatures().contains("plugins") and reuses the caller-provided
plugins map (plugins / message.pluginProp) even when plugins were disabled;
update the branching so that a breakout room only inherits the caller plugin map
when plugins are not disabled, and when disabledFeatures contains "plugins" do
not reuse the provided map (use an empty/no-plugins result instead) rather than
calling requestPluginManifests; locate this in MeetingService where pluginsMap
is assigned (refer to pluginsMap, requestPluginManifests(), isBreakout(),
getDisabledFeatures(), processCreateBreakoutRoom(), and message.pluginProp) and
implement the conditional split: breakout-with-plugins -> inherit caller map,
disabled-plugins -> no plugins, otherwise -> requestPluginManifests(m).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2ecd0731-246f-4f9c-9749-d4981a0f1a75
📒 Files selected for processing (2)
bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.javabbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java
✅ Automated tests have passed! |
38d91cc
into
bigbluebutton:v3.0.x-develop



What does this PR do?
Make the disable feature for plugins works
Closes Issue(s)
Closes #24881
How to test
disabledFeatures=plugins