Skip to content

v1.4.0

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 25 Aug 20:42
· 8 commits to main since this release

External Write API (shipped reserved — not yet active)

New POST/PATCH handlers on api/external/v1/{punches,timeoff,employees}.php, gated by three new scopes: punches:write, timeoff:write, employees:write. The code is complete, adversarially reviewed, and verified against the live database — but the scopes ship available => false, and that flag is now genuinely enforced at authorization time, not just described in the admin UI's copy. A key already holding one of these scope strings gets the same 403 as a key that was never granted it. Turning this on is a deliberate follow-up, not a side effect of this release.

  • employees:write can touch name, email, office, job title, phone, and lock-out only — never a badge ID, password, PIN, or 2FA setting.
  • Every write is idempotent via an optional Idempotency-Key header.
  • Punch and time-off writes are protected against concurrent-request races, proven with genuinely parallel requests, not just reasoned about.

Security & correctness fixes

  • Fixed an overnight-shift punch overlap bug that could double-count paid hours.
  • users.Email now has a real database-level uniqueness constraint.
  • Fixed a data bug where a blank Tag ID was stored as '' instead of NULL, which could crash the next save of any badge-less employee profile (admin console and employee self-service). One affected production record was corrected.
  • Fixed a bug where approving a time-off request spanning a year boundary deducted the leave balance against the wrong year — present in both the admin console and the new write API.

See CHANGELOG.md for details.