Skip to content

Secure admin dashboard and harden production data access - #10

Merged
Harmit2101 merged 1 commit into
mainfrom
fix/data-adjustment
Aug 14, 2026
Merged

Secure admin dashboard and harden production data access#10
Harmit2101 merged 1 commit into
mainfrom
fix/data-adjustment

Conversation

@Harmit2101

Copy link
Copy Markdown
Collaborator

Summary

  • Restrict admin login and dashboard access to Supabase Auth users with profiles.role = 'admin', including Access Denied for non-admins.
  • Add production RLS policies via private.is_admin() so only admins can manage jobs, pending reviews, and contact messages, while the public site can still read active jobs, read approved reviews, and submit pending reviews/contact forms.
  • Harden the public site for production: branded 404, SEO/sitemap/robots/OG, safer contact and review submissions, Applications overview, CI, Playwright smoke tests, and removal of leftover server/sitemap files.

Test plan

  • Sign in at /hm-portal-admin-dashboard/login with the real admin account and confirm dashboard, jobs, reviews, contact messages, and applications load.
  • As admin: create, update, disable, and delete a test job; confirm inactive jobs disappear from /careers.
  • Submit a public review while logged out; confirm it stays hidden on the homepage until approved in admin.
  • Submit a public contact message while logged out; confirm it appears in admin Contact Messages and cannot be listed from the public site.
  • Sign in with a non-admin Supabase user and confirm Access Denied / unauthorized, with no admin data visible.
  • Confirm .env was not committed and Vercel has VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.

@
feat: secure admin access with Supabase RLS and production hardening

Lock the admin dashboard to authenticated admin profiles, enforce row-level policies on jobs, reviews, contact messages, and profiles, and add the public-site, SEO, CI, and form validation needed to ship safely.
@
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hm-coding Ready Ready Preview Aug 14, 2026 9:17am

@Harmit2101
Harmit2101 merged commit 10016c3 into main Aug 14, 2026
3 of 4 checks passed
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