batch-v07g: disable / re-enable local accounts (#865, v0.6.329) #878

Merged
Cordy merged 7 commits from batch-v07g into main 2026-10-12 12:44:52 +00:00
Owner

Closes #865. Built to the approved mockup and the decisions on #865.

Server

  • A disabled local account is refused on every sign-in path: the form, Basic/WebDAV, app passwords, existing sessions (the generation bump plus a direct flag check) and WOPI tokens issued before the disable.
  • App passwords are kept but refused. An optional revoke goes through the #851 path with via=disable and sends no bell item.
  • Liveness reports a disabled local account as Disabled, so the #857 Paused rules apply as they are: Personal links answer 404, while Space links and internal grants keep working.
  • Rules (atomic under the store lock):
    • you can't disable yourself (cannot-disable-self);
    • you can't disable the last enabled local admin (last-admin);
    • a disabled account can't be made admin (account-disabled).
  • Disabled accounts count neither toward the 50-account cap nor toward seats. Enabling checks the cap again (user-limit, now on create too).
  • The sign-in page shows account-disabled only after a correct password, so it can't be used to find out which accounts exist.
  • Audit: account-disabled sessions=n appPasswords=kept|revoked and account-enabled.

UI

  • Accounts list: the DISABLED badge (same amber as directory accounts) and a dimmed row.
  • Row menu: Disable/Enable, greyed out with the reason on your own row and for the last admin. On a disabled row, Make admin is hidden and Remove admin stays.
  • The disable dialog follows the #851 style: the facts, an unticked revoke checkbox, and app-password counts fetched fresh when it opens. The enable dialog shows the account-limit state.
  • The owner-transfer picker greys out disabled local accounts.
  • Sign-in message in all languages.

Docs

users-access.md, admin-policy.md, local-accounts.md, and CHANGELOG v0.6.329 with upgrade notes.

Review

  • Server review found 4 Important issues, all fixed: WOPI tokens, the last-admin rule plus the race on it, seats re-taken by requests already in flight, and the race on the demote floor.
  • UI review found 3 Important issues, all fixed.
  • Final review found 1 Important issue (the transfer picker), fixed.
  • Checks: go test ./..., -race, gofmt, web tests 549/549.
Closes #865. Built to the approved mockup and the decisions on #865. ## Server - A disabled local account is refused on every sign-in path: the form, Basic/WebDAV, app passwords, existing sessions (the generation bump plus a direct flag check) and WOPI tokens issued before the disable. - App passwords are kept but refused. An optional revoke goes through the #851 path with `via=disable` and sends no bell item. - Liveness reports a disabled local account as Disabled, so the #857 Paused rules apply as they are: Personal links answer 404, while Space links and internal grants keep working. - Rules (atomic under the store lock): - you can't disable yourself (`cannot-disable-self`); - you can't disable the last enabled local admin (`last-admin`); - a disabled account can't be made admin (`account-disabled`). - Disabled accounts count neither toward the 50-account cap nor toward seats. Enabling checks the cap again (`user-limit`, now on create too). - The sign-in page shows `account-disabled` only after a correct password, so it can't be used to find out which accounts exist. - Audit: `account-disabled sessions=n appPasswords=kept|revoked` and `account-enabled`. ## UI - Accounts list: the DISABLED badge (same amber as directory accounts) and a dimmed row. - Row menu: Disable/Enable, greyed out with the reason on your own row and for the last admin. On a disabled row, Make admin is hidden and Remove admin stays. - The disable dialog follows the #851 style: the facts, an unticked revoke checkbox, and app-password counts fetched fresh when it opens. The enable dialog shows the account-limit state. - The owner-transfer picker greys out disabled local accounts. - Sign-in message in all languages. ## Docs users-access.md, admin-policy.md, local-accounts.md, and CHANGELOG v0.6.329 with upgrade notes. ## Review - Server review found 4 Important issues, all fixed: WOPI tokens, the last-admin rule plus the race on it, seats re-taken by requests already in flight, and the race on the demote floor. - UI review found 3 Important issues, all fixed. - Final review found 1 Important issue (the transfer picker), fixed. - Checks: `go test ./...`, `-race`, `gofmt`, web tests 549/549.
Cordy merged commit 3af7153e00 into main 2026-10-12 12:44:52 +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#878
No description provided.