-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: improved permissions and CVE-2025-64712 fix #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[Feat] Add public chat sharing permissions, sharing page, and graceful 404
- Removed outdated dependencies: unstructured-client and langchain-unstructured. - Added new versions for unstructured-client (0.42.3), unstructured[all-docs] (0.18.31), and langchain-unstructured (1.0.1).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by RecurseML
🔍 Review performed on e172983..2b1d33d
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (24)
• surfsense_backend/alembic/versions/90_add_public_sharing_permissions_to_roles.py
• surfsense_backend/app/db.py
• surfsense_backend/app/routes/new_chat_routes.py
• surfsense_backend/app/routes/search_spaces_routes.py
• surfsense_backend/app/schemas/new_chat.py
• surfsense_backend/app/services/public_chat_service.py
• surfsense_backend/pyproject.toml
• surfsense_web/app/dashboard/[search_space_id]/settings/page.tsx
• surfsense_web/app/dashboard/[search_space_id]/team/page.tsx
• surfsense_web/atoms/chat/chat-thread-mutation.atoms.ts
• surfsense_web/atoms/public-chat-snapshots/public-chat-snapshots-mutation.atoms.ts
• surfsense_web/atoms/public-chat-snapshots/public-chat-snapshots-query.atoms.ts
• surfsense_web/components/new-chat/chat-share-button.tsx
• surfsense_web/components/public-chat-snapshots/public-chat-snapshot-row.tsx
• surfsense_web/components/public-chat-snapshots/public-chat-snapshots-empty-state.tsx
• surfsense_web/components/public-chat-snapshots/public-chat-snapshots-list.tsx
• surfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsx
• surfsense_web/components/public-chat/public-chat-not-found.tsx
• surfsense_web/components/public-chat/public-chat-view.tsx
• surfsense_web/contracts/types/chat-threads.types.ts
• surfsense_web/lib/apis/chat-threads-api.service.ts
• surfsense_web/lib/query-client/cache-keys.ts
• surfsense_web/messages/en.json
• surfsense_web/messages/zh.json
⏭️ Files skipped (1)
| Locations |
|---|
surfsense_backend/uv.lock |
Description
Motivation and Context
FIX #
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR implements a role-based access control (RBAC) system for public chat sharing with new
public_sharing:view,public_sharing:create, andpublic_sharing:deletepermissions. The changes include a database migration to add these permissions to existing Editor and Viewer roles, refactoring of the public chat snapshot service to enforce permission checks using RBAC instead of ownership-only checks, a new settings page for managing public chat snapshots at the search space level, and a comprehensive frontend implementation with permission-aware UI components. Additionally, the PR updatesunstructuredandunstructured-clientdependencies and renames API schemas fromSnapshot*toPublicChatSnapshot*for improved clarity.⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
surfsense_backend/alembic/versions/90_add_public_sharing_permissions_to_roles.pysurfsense_backend/app/db.pysurfsense_backend/app/services/public_chat_service.pysurfsense_backend/app/routes/new_chat_routes.pysurfsense_backend/app/routes/search_spaces_routes.pysurfsense_backend/app/schemas/new_chat.pysurfsense_backend/pyproject.tomlsurfsense_web/lib/query-client/cache-keys.tssurfsense_web/contracts/types/chat-threads.types.tssurfsense_web/lib/apis/chat-threads-api.service.tssurfsense_web/atoms/public-chat-snapshots/public-chat-snapshots-query.atoms.tssurfsense_web/atoms/public-chat-snapshots/public-chat-snapshots-mutation.atoms.tssurfsense_web/atoms/chat/chat-thread-mutation.atoms.tssurfsense_web/components/public-chat-snapshots/public-chat-snapshots-empty-state.tsxsurfsense_web/components/public-chat-snapshots/public-chat-snapshot-row.tsxsurfsense_web/components/public-chat-snapshots/public-chat-snapshots-list.tsxsurfsense_web/components/public-chat-snapshots/public-chat-snapshots-manager.tsxsurfsense_web/components/public-chat/public-chat-not-found.tsxsurfsense_web/components/public-chat/public-chat-view.tsxsurfsense_web/components/new-chat/chat-share-button.tsxsurfsense_web/app/dashboard/[search_space_id]/settings/page.tsxsurfsense_web/app/dashboard/[search_space_id]/team/page.tsxsurfsense_web/messages/en.jsonsurfsense_web/messages/zh.jsonsurfsense_backend/pyproject.toml