Limit admin server listings to owned and shared servers#9953
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis PR restricts server and server-group visibility for administrator users by introducing a centralized ChangesAdmin visibility enforcement in server listings
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
why was this closed? It's extremely stupid that I now see ALL users servers with my admin user?? |
|
For anyone landing here from a search (particularly @blaargh whose comment is above) — context on what happened and where things stand: The underlying bug has been fixed, just not by this PR.
So if you're seeing this on pgAdmin 9.15 — the bug is still there, because 9.15 was released before the fix landed. The fix will be in 9.16 when that releases. There's no clean workaround for 9.15 short of patching To @Zaid-L9: thanks for the contribution attempt — it's a real bug you correctly identified. The maintainer team's eventual fix took a different approach (removing the four targeted bypasses rather than introducing a new visibility-query function), but your PR's existence and analysis helped surface that the bug needed attention. To @blaargh: your June 2 comment was a fair frustration at the time — the bug WAS still in master then, and pgAdmin had been broken for admin users since 9.15. As of June 6 it's fixed on master; it'll be in the next release. |
Summary
Fixes #9933
Testing
python -m py_compile web/pgadmin/utils/server_access.py web/pgadmin/utils/tests/test_server_access.py web/pgadmin/browser/server_groups/servers/__init__.py web/pgadmin/tools/sqleditor/__init__.pygit diff --checkgit diff -U0 | python -m pycodestyle --diffThe regression runner attempt timed out before producing test results.
Summary by CodeRabbit
Bug Fixes
Tests