Platform & Access · Idle auto-logout

Per-centre inactivity timer that warns the user and then ends the session. The timeout in minutes is configured on the centre’s auto_logout module.

AreaPlatform & Access
Routes(application-wide)
Centre modulesauto_logout
Staff levelsall
Modelsmodule-auto-logout
UI labelmodal.logout.description
Coverage2 use cases · 2 happy · 3 failure

Known issues (2)

How it works

The monitor listens to mousemove, mousedown, keypress and touchmove on window and restarts an Ember later() timer on each event. It is a no-op when the module is disabled or minutes is unset. The application controller exposes keepSessionActive and logoutNow, plus minutesBeforeLogout for the warning copy. Note willDestroy removes listeners using fresh .bind(this) references, so those removeEventListener calls do not actually detach the original handlers — a real leak if the service is ever torn down.

Use cases

Why someone opens this (2)

  • A shopping-centre back office on a shared desktop where unattended sessions must not stay open.
  • Centres with stricter data-protection requirements enabling a short window while others leave it off.

Path map

flowchart LR
    F(["Idle auto-logout"]):::feat
    F --> H1["Session kept alive"]:::ok
    F --> H2["Idle session closed"]:::ok
    F -.-> X1["Module enabled but minutes unset"]:::bad
    F -.-> X2["Centre not loaded yet"]:::bad
    F -.-> X3["Unsaved work lost"]:::bad
    classDef feat fill:#4a5c8a,stroke:#4a5c8a,color:#ffffff,font-weight:bold
    classDef ok fill:#e3f1ea,stroke:#0d6b42,color:#0d4a2e
    classDef bad fill:#f7e6e2,stroke:#9a2d1c,color:#6e1f13

Happy paths

Session kept alive

  1. Centre has auto_logout.enabled with e.g. 15 minutes.
  2. User is idle; the timer fires and the warning modal appears with the remaining minutes.
  3. User clicks ‘keep session active’; the timer resets and work continues.

Idle session closed

  1. User walks away; no input events arrive before the timeout.
  2. logout is triggered, the session is invalidated and the app returns to the login screen.

Failure paths

QA checklist

Tick these off while regression-testing this feature. The boxes are plain Markdown, so progress is visible in git diffs.

  • ✅ Session kept alive
  • ✅ Idle session closed
  • ⛔ Module enabled but minutes unset
  • ⛔ Centre not loaded yet
  • ⛔ Unsaved work lost

Implementation


Generated from doc/feature-inventory.json · id platform-auto-logout · commit 276788ca6