Move god mode state to global useUserInfo hook

Fixkamo-internal
Shipped
2025年10月24日 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

配送を見るのが好きですか?

これらのアップデートは、自動的にワークスペースに埋め込まれます。 週1回無料スタートし、週1回生育する.

永遠に無料で始める料金を見る