Skip to content

feat: restrict knowledge base to admins, add upload source metadata - #88

Merged
androemeda merged 6 commits into
mainfrom
knowledge-base
Aug 9, 2026
Merged

feat: restrict knowledge base to admins, add upload source metadata#88
androemeda merged 6 commits into
mainfrom
knowledge-base

Conversation

@androemeda

Copy link
Copy Markdown
Collaborator

Locks down the /kb/* endpoints (previously public) to admin-role users only, and hides the sidebar's Admin section from non-admins.

  • Add require_admin dependency (core/auth.py) that checks the Supabase role column after Auth0 verification; apply it to all /kb/* routes
  • Add GET /users/me/role so the frontend can read the current user's role
  • Hide the sidebar's Admin/Knowledge Base section unless role === "admin"
  • Send the bearer token on the knowledge-base admin page's fetch calls (previously unauthenticated, would have broken once the backend started requiring auth)
  • Add optional source_url and an uploaded_at timestamp to KB upload chunk payloads

@androemeda
androemeda merged commit 2865466 into main Aug 9, 2026
1 check passed
@androemeda
androemeda deleted the knowledge-base branch August 9, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant