diff --git a/web/src/pages/citizens/GovernmentEntrance.tsx b/web/src/pages/citizens/GovernmentEntrance.tsx index c1458a6c..a20f2b73 100644 --- a/web/src/pages/citizens/GovernmentEntrance.tsx +++ b/web/src/pages/citizens/GovernmentEntrance.tsx @@ -568,6 +568,81 @@ export default function GovernmentEntrance() { ); } + // SECURITY: Block access if not verified + if (!accessGranted) { + return ( +
+ {/* Access Verification Modal */} + { + // Don't allow closing without verification - redirect instead + if (!open && !accessGranted) { + navigate('/citizens'); + } + }}> + + + + 🔒 Kontrola Gihîştinê (Access Verification) + + + Ji kerema xwe Citizenship ID-ya xwe binivîse da ku gihîştina xwe bipejirînin + (Please enter your Citizenship ID to verify your access) + + +
+
+ + setInputCitizenId(e.target.value)} + className="bg-white border-2 border-blue-400 text-gray-900 placeholder:text-gray-500" + disabled={isVerifying} + /> +
+
+

+ ⚠️ Tenê xwedîyên Tiki-yên hikûmetê dikarin vê rûpelê bigihînin + (Only government Tiki holders can access this page) +

+
+
+
+ + +
+
+
+
+ ); + } + return (
@@ -799,72 +874,6 @@ export default function GovernmentEntrance() { - {/* Access Verification Modal */} - - - - - 🔒 Kontrola Gihîştinê (Access Verification) - - - Ji kerema xwe Citizenship ID-ya xwe binivîse da ku gihîştina xwe bipejirînin - (Please enter your Citizenship ID to verify your access) - - -
-
- - setInputCitizenId(e.target.value)} - className="bg-white border-2 border-blue-400 text-gray-900 placeholder:text-gray-500" - disabled={isVerifying} - /> -
-
-

- ⚠️ Tenê xwedîyên Tiki-yên hikûmetê dikarin vê rûpelê bigihînin - (Only government Tiki holders can access this page) -

-
-
-
- - -
-
-
- {/* Propose Legislation Modal */}