Admin or role check trusts the browser's storage
The admin page decides who is an admin by reading localStorage. Anyone can set that value in their own browser and walk in.
- file
- src/pages/Admin.tsx
- line
- 18
- code
- if (localStorage.getItem("role") === "admin")