{{ message }}
Feature: Integrate panel user permissions by section for custom modules#3723
Merged
gmt2001 merged 4 commits intoMay 19, 2026
Merged
Conversation
Add CustomPanelManifestRegistry for settingsModal tables and card scriptPath values. Filter custom-manifests.json by Panel User read access with per-user ETags and fail-closed empty output on filter errors.
Expose panelSectionAccess helpers on __pbCustomPanel__, pass nav.section through data-panel-section and websocket messages, and show read-only Games card controls with the stock permission toast.
gmt2001
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Brief description of the intended change
Custom panel modules (
manifest.jsonnav / cards) now respect Settings → Panel Users section permissions the same way stock panel pages do. Panel Users only receive manifest entries for sections they can read; websocket section, INIDB table, and Rhino scriptPath checks resolve through manifest metadata. Read-only users still see custom UI where allowed, but writes are blocked server-side and in the panel with the standard permission toast.PhantomBot/source/com/mcawful/CustomPanelManifestRegistry.java
settingsModalfield table names and card scriptPath values to manifest section (games,extra, etc.) forPanelUserHandler.PhantomBot/source/com/mcawful/CustomPanelManifestCollector.java
CustomPanelManifestRegistryafter each manifest merge.filterManifestBytesForPanelUser()to drop nav / cards entries the logged-in Panel User cannot read.{"nav":[],"cards":[]}instead of the unfiltered merge.PhantomBot/source/com/mcawful/CustomPanelManifestCache.java
computeStrongEtag()so filtered per-user manifest bodies get correct ETag / 304 behavior.PhantomBot/source/tv/phantombot/httpserver/HTTPPanelAndYTHandler.java
GET /panel/custom-manifests.json.sendCachedBytes.PhantomBot/source/tv/phantombot/panel/PanelUser/PanelUserHandler.java
CustomPanelManifestRegistry.panelSectionForTable()before stock section table lists.panelSectionForScript()when the script is declared on a manifest card.PhantomBot/resources/web/panel/js/utils/customPanelManifestLoader.js
panelSectionAccess,panelSectionCanWrite,requirePanelSectionWrite, andnotifyPanelWriteDeniedonwindow.__pbCustomPanel__.keywords→keywords & emotes).PhantomBot/resources/web/panel/js/utils/customPanelNav.js
data-panel-sectionon manifest-injected sidebar links fromnav.section.PhantomBot/resources/web/panel/js/utils/ajaxLoader.js
panelSectionon$.currentPage()when loading a page from a nav link.PhantomBot/resources/web/panel/js/index.js
message.sectionfrompanelSection(manifest section) instead of thecustom/...folder path.PhantomBot/resources/web/panel/js/utils/customPanelCards.js
aria-disabledand read-only CSS on the settings cog (not Bootstrapdisabled, so clicks still reach the toast handler).modulesDB load when the user cannot write.PhantomBot/resources/web/panel/js/utils/customPanelSettingsModal.js
openSettingsModaland save withrequirePanelSectionWritefor the card’s manifest section.PhantomBot/docs/guides/content/developerdocs/custommodules.md
__pbCustomPanel__helpers, read-only UI patterns, and troubleshooting (wrong section, async delete success).