Move god mode state to global useUserInfo hook

Fixkamo-internal
Shipped
24 de outubro de 2025 às 21:44 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

All changes

Como o que vês no transporte?

Cada uma dessas atualizações pousa automaticamente em seu espaço de trabalho. Comece grátis e veja crescer semana após semana.

Começar Livre Para SempreVer Preços