KamoCRM

God mode global state + session expiration at zero verification

Fixkamo-internal
Name
lúc 21:53 24 tháng 10, 2025 UTC
Tác giả
snadjafinia
Cam kết
93b5085

1. God Mode State (useUserInfo hook): - Move isGodMode to GLOBAL state in hook (not local to NavTop) - Export isGodMode, setIsGodMode for all components - isGodModeActive() = isGod (permission) AND isGodMode (state) - Auto-loads/saves to localStorage in hook 2. NavTop Component: - Remove local godModeActive state - Use global isGodMode from hook - Completely isolated from acceptingLeads toggle - Toggle calls setIsGodMode() from hook 3. Session Warning at Zero: - When countdown reaches 0, verify actual Redis TTL - If TTL > 300s: Close popup (extended by another app) - If TTL > 0 but < 300s: Update timer with new TTL - If TTL = 0 or 404: Redirect to /logout (truly expired) - Prevents false expiration when another app extended session Architecture: - isGod: Permission from session (read-only) - isGodMode: Global UI state (user-controlled) - isGodModeActive(): Secure check (both required) This fixes: - God mode toggle interference with accepting leads - Session popup stuck at 0:00 when session still valid - Proper logout when session actually expires

Mọi thay đổi

Như những gì anh thấy vận chuyển?

Tất cả những thứ đó đều đến trong không gian làm việc của anh. Bắt đầu với kế hoạch miễn phí và đọc lại trang này trong một tháng.

Bắt đầu tự do mãi mãiXem truy cập