feat: replace admin account with admin@braidsbymira.com

Swaps the single fixed admin UUID that every admin-write/admin-read RLS
policy and the frontend's ProtectedRoute check against, moving off the
personal belviskhoremk@gmail.com account onto a dedicated
admin@braidsbymira.com login created via the Auth admin API. Updates
the RLS test suite's admin-impersonation UUID to match.

Claude-Session: https://claude.ai/code/session_01NhxA4npAXAxmCDEJt6kxSH
This commit is contained in:
belviskhoremk
2026-08-12 23:51:49 +02:00
parent 56679b872b
commit f41c6f5812
5 changed files with 46 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ describe('ProtectedRoute', () => {
it('renders the protected content when there is an admin session', () => {
adminAuthMock.mockReturnValue({
session: { user: { id: '21c90224-e0b2-412e-a431-8e7f097c1cef' } },
session: { user: { id: '2b88676b-f901-459a-9147-b914190c4f81' } },
loading: false,
})
renderWithRoute()

View File

@@ -7,7 +7,7 @@ import useAdminAuth from '../hooks/useAdminAuth'
// defense-in-depth: it ensures the admin UI itself never renders for an
// authenticated session that isn't the admin's, even if signup were ever
// re-enabled or a session existed for some other reason.
const ADMIN_USER_ID = '21c90224-e0b2-412e-a431-8e7f097c1cef'
const ADMIN_USER_ID = '2b88676b-f901-459a-9147-b914190c4f81'
function ProtectedRoute() {
const { session, loading } = useAdminAuth()

View File

@@ -3,7 +3,7 @@ import { MemoryRouter, Routes, Route } from 'react-router-dom'
import { describe, it, expect, vi } from 'vitest'
vi.mock('../../hooks/useAdminAuth', () => ({
default: () => ({ session: { user: { id: '21c90224-e0b2-412e-a431-8e7f097c1cef' } }, loading: false }),
default: () => ({ session: { user: { id: '2b88676b-f901-459a-9147-b914190c4f81' } }, loading: false }),
}))
vi.mock('../../lib/supabase', () => ({
supabase: {