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:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user