From 03af5991f30fe24c168b7c10543b7507ac09ff98 Mon Sep 17 00:00:00 2001 From: Akash Date: Sat, 4 May 2024 23:38:34 +0530 Subject: [PATCH] Closes #7 Revamped Admin priviledges Signed-off-by: Akash --- app/admin/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/page.tsx b/app/admin/page.tsx index bdd180b..1acbef0 100644 --- a/app/admin/page.tsx +++ b/app/admin/page.tsx @@ -24,8 +24,8 @@ const AdminPage = () => { fetchQuizData(); onAuthStateChanged(auth, (user) => { if (user) { - if (user.providerData[0].email === 'admindsce@dsce.com' || user.providerData[0].email === 'testadmin@dsce.com') { - console.log(user.uid) + //these are the admin user uid's. Yes i wrote it in the code. Go cry about it. + if (user.uid === 'faNLMo6zT2XhXH0dTBaJQunXe9B3' || user.uid === 'BiiqrNezHSM8NTF1P5yNkkX4x8F2') { setUser(user); } else { toast.error("Unauthorized :(");