- Shipped
- October 24, 2025 at 9:44 PM UTC
- Author
- snadjafinia
- Commit
- da97785
BREAKING FIX: Properly separates isGod and isGodMode Architecture (as intended): - isGod: Permission from session (GD field) - Can user access god mode? - isGodMode: Global UI state - Is god mode currently ON/OFF? - isGodModeActive(): Returns (isGod AND isGodMode) - Secure check Changes to useUserInfo hook: - Add isGodMode state (global, not local to NavTop) - Add setIsGodMode() to control god mode state globally - isGodModeActive() now checks: isGod (session) AND isGodMode (state) - Auto-loads/saves to localStorage Changes to NavTop: - Remove local godModeActive state - Use global isGodMode from hook - Use setIsGodMode to toggle - Display based on isGodMode state This fixes: - God mode state now accessible from any component - Properly isolated from accepting leads toggle - Secure validation: even if isGodMode=true, returns false if isGod=false Other components can now use: - getIsGod() - Check if user has permission - isGodModeActive() - Check if god mode is permitted AND enabled