Commit graph

11 commits

Author SHA1 Message Date
42c1a33c4b Auth seed: include name in ON CONFLICT DO UPDATE so renames take effect on restart
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-04 13:23:15 +00:00
edbaeeda08 Rename housekeeping category to Hotel, HK Planner to Rota Check
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-04 13:19:39 +00:00
a03b065c43 Auth: assignable-users endpoint + maintenance app seed row
GET /api/auth/users?app=<slug> — non-admin user list for task allocation
(requester must have access to the app; returns active users with access,
minimal fields). Seed row for the maintenance app (LXC 121).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 21:29:08 +00:00
6e5009b57f Expand cashup caps: history, cash_summary, safe_count
Splits the old 'reports' cap into reports + cash_summary,
'floats' into floats + safe_count, and adds a new 'history' cap.
Existing installs get the three new caps added to the Staff role
via an additive per-cap seed so admin-managed configs are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 14:36:06 +00:00
b5d494a691 Seed hk-planner capabilities: planner + settings
Staff role gets planner by default; settings is admin/explicit-grant only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 14:29:58 +00:00
c7f7079b99 Add per-app granular capabilities (RBAC beyond app access)
Schema:
- app_capabilities: capabilities each app exposes (<app>:<slug>)
- role_capabilities / user_capabilities: grants via roles and direct
- Seed cashup caps (count, finalise, reports, floats, settings)
- Non-breaking migration: default Staff role gets all cashup caps
  except settings (previously only is_admin reached settings)

Resolution:
- getUserCapabilities(): admins get all; others get union of
  role + direct grants, as "<app>:<cap>" strings
- caps[] added to JWT payload (login + register)
- /verify returns live capabilities for the requested app (bare slugs)

Admin API:
- GET /admin/capabilities catalogue
- grant/revoke capability on roles and users
- roles/users GET responses now include their capabilities

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 14:19:08 +00:00
fdbc4df29c Seed hk-planner app (10.10.10.118)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 13:59:02 +00:00
2d89fd9227 Fix cashup app seed: correct host to 10.10.10.117 and port to 3083
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 20:23:06 +00:00
7fd1ed8381 Add app category grouping support
Add category column to apps table with migration, update seed with category
values for existing apps, and include category in auth queries ordered by
category then name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:26:01 +00:00
a0edbec92b Switch app icons to Lucide names, update existing rows on conflict
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 18:09:55 +00:00
372e71c8f5 Initial commit: auth 2026-07-01 12:09:54 +00:00