SurfSense/surfsense_web/app
Ojārs Kapteinis ae6455069b Add superuser authentication check to site-settings page
Enhanced security for site configuration admin panel to ensure only superusers can access and modify site settings.

Backend changes:
- Enhanced /verify-token endpoint to return user information including is_superuser flag
- Now returns user.id, email, is_active, is_superuser, and is_verified status
- Allows frontend to verify user permissions before loading sensitive pages

Frontend changes:
- Added superuser verification check to site-settings page
- Verifies user is authenticated AND is_superuser before loading page
- Shows loading screen with "Verifying Access" message during check
- Redirects non-superusers to dashboard with clear error toast
- Prevents unauthorized access to admin-only configuration

Security improvements:
- Layered protection: Dashboard auth + Page-level superuser check + Backend API validation
- Clear error messages for non-superusers
- Graceful UX with loading states and redirects
- Backend API endpoints already protected with superuser checks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:07:39 +02:00
..
(home) Add disable_registration toggle to site configuration 2025-11-18 14:28:16 +02:00
api feat: contact to frontpage and biome 2025-09-30 22:15:55 -07:00
auth/callback Initial formatting using biome 2025-07-27 10:05:37 -07:00
dashboard Add superuser authentication check to site-settings page 2025-11-18 15:07:39 +02:00
db try vercel fix 2025-09-30 22:45:04 -07:00
docs Initial formatting using biome 2025-07-27 10:05:37 -07:00
favicon.ico feat: monorepo 2025-04-07 23:47:06 -07:00
globals.css Initial formatting using biome 2025-07-27 10:05:37 -07:00
layout.config.tsx Initial formatting using biome 2025-07-27 10:05:37 -07:00
layout.tsx Implement dynamic site appearance configuration system 2025-11-18 10:58:31 +00:00
sitemap.ts chore: updated sitemap 2025-10-02 18:13:30 -07:00