fix(admin): stop hiding other teams' public rows when filtering by team - #6423
Open
Yosiefeyob wants to merge 1 commit into
Open
fix(admin): stop hiding other teams' public rows when filtering by team#6423Yosiefeyob wants to merge 1 commit into
Yosiefeyob wants to merge 1 commit into
Conversation
Signed-off-by: Yosief Eyob <yosiefogbazion@gmail.com>
Yosiefeyob
force-pushed
the
fix/admin-partial-public-rows
branch
from
August 26, 2026 14:58
b62901c to
b47e77d
Compare
Yosiefeyob
marked this pull request as ready for review
August 26, 2026 15:06
Yosiefeyob
requested review from
Lang-Akshay,
brian-hussey,
crivetimihai,
ja8zyjits and
msureshkumar88
as code owners
August 26, 2026 15:06
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.
Pull Request
🔗 Related Issue
Closes #6193
📝 Summary
Admin list endpoints hid globally-public rows owned by other teams when filtering by team. These queries are hand-built in
admin.pyrather than going throughBaseService, and gated the globally-public condition behindinclude_public— which the main resource tables never set.All of them now route through a shared
team_scoped_conditions()helper, extracted to module scope inbase_service.pysoadmin.pyand the service layer use one definition. Team filtering includes globally-public rows by default; callers passinclude_public=falseto opt out.Scope is 19 endpoints, not the 12 in the issue.
/admin/servers/*,/admin/a2a/*and/admin/tool-ops/partialhave the same bug and are worse — noinclude_publicparameter at all, so public rows were suppressed with no way to see them.On the fix the issue suggests: it proposes dropping the
include_publicgate, on the basis that nothing in the UI sets it. The "View Public" toggle in the server add/edit modals does set it (filters.js,gateways.js,tools.js,prompts.js,resources.js,search.js), and dropping the gate would have made that checkbox a no-op. Instead the default is flipped and the modals send the negative explicitly, so the toggle keeps working with no user-visible change.📏 Reviewability
triage🏷️ Type of Change
🧪 Verification
Manual check in the Admin UI, two builds against the same database —
mainon one port, this branch on another. Four gateways seeded: one team-scoped in team alpha, one team-scoped in team beta, one public owned by beta, one public with no team. Selecting team alpha, then MCP Servers:Same result on the Tools tab. Other teams' team-scoped rows stay hidden, so nothing widened beyond public.
New tests mutation-checked: making the helper stop including public rows fails 6 of 14; reverting a single endpoint to an inline condition list fails 1.
make lintruffclean on changed filesmake testmake coverage✅ Checklist
make black isort pre-commit)📓 Notes (optional)
tests/js/admin-view-public.test.jscovers this toggle but is not collected —tests/js/**has been commented out invitest.config.jssince #3137 splitadmin.jsinto modules. Three of its assertions encode the previous contract and would need updating if that suite is re-enabled. Left alone here rather than expanding this change.