Account sources: config accounts read-only on Users & access, docs, no long dashes (#846) #855

Merged
Cordy merged 5 commits from accounts-846 into main 2026-10-07 08:14:39 +00:00
Owner

Closes #846. v0.6.320.

Config-file accounts (auth.users) are now visible and read-only:

  • They appear under Local accounts with a 🔒 Config file badge, a keyboard-reachable tooltip, and no actions. They don't count toward the 50-account limit.
  • Every change endpoint refuses them (409), including granting admin through directory-admins.
  • Add account refuses a name that's in the config file and says so, in four languages.

Legacy name clash (a name in both the config file and local-users.json): sign-in uses the config entry, so:

  • one config row is shown with an "ignored older account, Remove it" line;
  • the last-admin guard and the admin sources ignore the ignored entry's admin flag;
  • Cairn logs a WARN at startup naming the clash.

Admin rights: new tests pin that an admin role granted from the dashboard is independent of the configured admin group. It survives a directory re-check without the group, and leaving the group doesn't revoke it (as Nikola asked).

Copy:

  • Empty state: "No local accounts yet…". The info box and directory text follow the approved mockup.
  • Every long dash is removed from UI text in all four languages, and from server strings. Guard tests in web and Go keep them out. French joiners now use " : ".

Docs:

  • local-accounts.md has a new "Account sources" section with the table, a worked example, the admin-role sources, the wizard admin and its guards, a break-glass recommendation, and the CAIRN_ADMIN_USERNAME note.
  • deployment.md, admin-policy.md and users-access.md link to it.

Reviewed: the first review found 2 Important issues (both fixed); the re-review says ready to merge.

Closes #846. v0.6.320. **Config-file accounts (`auth.users`) are now visible and read-only:** - They appear under Local accounts with a 🔒 Config file badge, a keyboard-reachable tooltip, and no actions. They don't count toward the 50-account limit. - Every change endpoint refuses them (409), including granting admin through directory-admins. - **Add account** refuses a name that's in the config file and says so, in four languages. **Legacy name clash** (a name in both the config file and local-users.json): sign-in uses the config entry, so: - one config row is shown with an "ignored older account, Remove it" line; - the last-admin guard and the admin sources ignore the ignored entry's admin flag; - Cairn logs a WARN at startup naming the clash. **Admin rights:** new tests pin that an admin role granted from the dashboard is independent of the configured admin group. It survives a directory re-check without the group, and leaving the group doesn't revoke it (as Nikola asked). **Copy:** - Empty state: "No local accounts yet…". The info box and directory text follow the approved mockup. - Every long dash is removed from UI text in all four languages, and from server strings. Guard tests in web and Go keep them out. French joiners now use " : ". **Docs:** - local-accounts.md has a new "Account sources" section with the table, a worked example, the admin-role sources, the wizard admin and its guards, a break-glass recommendation, and the CAIRN_ADMIN_USERNAME note. - deployment.md, admin-policy.md and users-access.md link to it. Reviewed: the first review found 2 Important issues (both fixed); the re-review says ready to merge.
GET /admin/local-users and /admin/access list auth.users names with
source "config" (admin only via auth.admins, no sign-in time, not
counted toward the limit). Change endpoints refuse a config-only name
with 409; creating a config name is refused. The UI sorts them last
with a CONFIG FILE lock tag, a lock instead of the menu, and new info
box, empty-state and directory copy in four languages.
Every U+2014 in the i18n strings (EN/DE/FR/IT), the static markup, the
login/setup/storage-setup pages, the share pages and server error and
log strings is rewritten with a full stop, colon, comma, semicolon or
parentheses. Lone dashes that mark an empty table cell stay. Guards:
web/test/no-long-dash.test.js and cmd/cairnd TestNoLongDashInStrings.
accounts: config names fully read-only; review fixes (#846)
All checks were successful
ci / test-and-build (pull_request) Successful in 1m51s
a8ddb0598c
Cordy merged commit 873e76e6bf into main 2026-10-07 08:14:39 +00:00
Cordy deleted branch accounts-846 2026-10-07 08:14:42 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#855
No description provided.