Problem Statement
The application currently determines administrative privileges using hardcoded email allowlists embedded directly within frontend source files.
Examples include:
const ADMIN_EMAILS = [...]
located in:
src/pages/AdminDashboard.tsx
src/pages/Resources.tsx
While this approach may provide UI-level access control, it should not be considered a secure authorization mechanism.
Administrative authorization should be enforced by trusted backend systems or database security rules rather than client-side code that is fully visible and modifiable by end users.
Security Risks
1. Administrator Information Disclosure
Because the admin allowlist is bundled into production JavaScript, any user can inspect browser DevTools, source maps, or compiled assets and retrieve administrator email addresses.
Potential consequences:
- Targeted phishing attacks
- Social engineering attempts
- Enumeration of privileged accounts
2. Authorization Logic Exists in an Untrusted Environment
Frontend code executes on the user's device and therefore cannot be trusted for security decisions.
Current logic:
ADMIN_EMAILS.includes(user.email)
can be bypassed through:
- Browser DevTools manipulation
- Modified client bundles
- Custom scripts
- Direct Firebase SDK usage
Even if the UI hides administrative controls, an attacker can still manually invoke database operations if backend rules are not enforcing equivalent restrictions.
3. Operational Maintenance Burden
Managing administrators through source code introduces unnecessary operational friction.
Current workflow:
Add Admin
→ Modify Code
→ Commit
→ Deploy
→ Wait for New Build
This creates avoidable overhead for routine role management.
Acceptance Criteria
Verification Plan
Authorization Testing
Non-Admin User
Verify:
- Cannot approve NGO requests.
- Cannot delete protected content.
- Cannot perform admin-only writes through direct SDK calls.
Expected Result:
Admin User
Verify:
- Administrative dashboard loads.
- NGO moderation actions succeed.
- Resource management operations succeed.
Expected Result:
Security Validation
- Build production assets.
- Inspect bundled JavaScript.
- Confirm no administrator email allowlists are present.
Expected Result:
No hardcoded admin identities exposed in client code.
Contribution Interest
Hiii @Piyushydv08 . I’d love to work on this issue and submit a PR implementing the offline detection flow as part of GSSoC'26
please assign this issue to me !!
Problem Statement
The application currently determines administrative privileges using hardcoded email allowlists embedded directly within frontend source files.
Examples include:
located in:
src/pages/AdminDashboard.tsxsrc/pages/Resources.tsxWhile this approach may provide UI-level access control, it should not be considered a secure authorization mechanism.
Administrative authorization should be enforced by trusted backend systems or database security rules rather than client-side code that is fully visible and modifiable by end users.
Security Risks
1. Administrator Information Disclosure
Because the admin allowlist is bundled into production JavaScript, any user can inspect browser DevTools, source maps, or compiled assets and retrieve administrator email addresses.
Potential consequences:
2. Authorization Logic Exists in an Untrusted Environment
Frontend code executes on the user's device and therefore cannot be trusted for security decisions.
Current logic:
can be bypassed through:
Even if the UI hides administrative controls, an attacker can still manually invoke database operations if backend rules are not enforcing equivalent restrictions.
3. Operational Maintenance Burden
Managing administrators through source code introduces unnecessary operational friction.
Current workflow:
This creates avoidable overhead for routine role management.
Acceptance Criteria
ADMIN_EMAILSarrays are removed.Verification Plan
Authorization Testing
Non-Admin User
Verify:
Expected Result:
Admin User
Verify:
Expected Result:
Security Validation
Expected Result:
Contribution Interest
Hiii @Piyushydv08 . I’d love to work on this issue and submit a PR implementing the offline detection flow as part of GSSoC'26
please assign this issue to me !!