API scoping for non-admin users, and cleaner push notifications.
Non-admin API access
A regular user's API token now works the way their web login does. Endpoints that were admin-only over the API — repository create/rename/delete, passphrase change, archive locking, plan create/edit/delete, the client summary — respect the same visibility and permission rules as the web: users see their assigned clients, and the five action permissions (trigger backups, manage repositories, manage plans, perform restores, repository maintenance) gate what they can do to them.
Actions the user lacks answer with the permission named the way the user-edit screen labels it, so an API client can show the message as it stands. Scoped lists return the visible subset rather than refusing. Sign-in responses carry the user's permission flags so a client can hide controls that would be refused everywhere.
Two related corrections: GET /api/v1/health is admin-only now, matching the web — it names every overdue client and describes server state, which a token scoped to one client should not read. An assigned user may rename a client they can see; every other client field stays with the admin role.
Push notifications
- The client name is the whole title, so it can never truncate away; what happened moved to the body: "Backup Done: System Backup — 1,287,986 files, 3m 24s".
- File count and duration are back on completed-backup alerts. The last-run lookup could pick up a prune or post-script instead of the backup itself, losing the numbers.