Local accounts: disable / re-enable (today only "Delete user") #865

Closed
opened 2026-10-08 20:55:57 +00:00 by Cordy · 4 comments
Owner

Raised by Nikola on 2026-10-08, while reviewing the #851 preview.

Today

  • A local account (dashboard, local-users.json) has no disabled state. The row menu offers Edit display name, Reset password, Make/Remove admin, Remove picture and Delete user.
  • storedUser has no flag for it, and the liveness oracle (#857) only knows "exists" for local accounts. So a local account can only be live or departed, never Paused.
  • Directory accounts already have the full disabled behaviour (#857, #862):
    • Paused: public links into the Personal area answer 404, Space links keep working and are flagged, internal grants keep working;
    • not listed as departed, and refused as a transfer target;
    • a DISABLED badge in Users & access.

Why it matters

  • Offboarding or a suspected compromise often needs "stop access now, decide later" without freezing shares as departed or starting an estate transfer. For local accounts the only tool today is deletion, which is the heavy, irreversible-feeling path.
  • This makes local accounts behave the same as directory accounts, which the admin and policy docs already describe.

Scope to decide when this is worked on

  • What disable does at once: end browser sessions (generation bump) and refuse sign-in, Basic and app passwords. Are app passwords kept but refused while disabled (like a directory-disabled user), or revoked (#851)?
  • It should reuse the #857 Paused semantics unchanged, with the oracle returning Disabled for a flagged local account.
  • Who can be disabled:
    • not yourself;
    • not the last local admin (the break-glass rule);
    • auth.users config accounts are not affected, since they are managed in the config file.
  • UI: the row-menu entry "Disable account" / "Enable account", the DISABLED badge (as for directory accounts), and a confirmation dialog in the #851 style.
  • Audit verbs (admin tier), a bell item for the user on re-enable or not, and whether disabled accounts count toward the 50-account limit or seats.
  • Docs: users-access.md, admin-policy.md.

Research first (others: Nextcloud "disable user", ownCloud, Seafile "inactive", Synology). Then ask the open decisions. A mockup is needed before any UI work.

Raised by Nikola on 2026-10-08, while reviewing the #851 preview. ## Today - A local account (dashboard, `local-users.json`) has no disabled state. The row menu offers Edit display name, Reset password, Make/Remove admin, Remove picture and **Delete user**. - `storedUser` has no flag for it, and the liveness oracle (#857) only knows "exists" for local accounts. So a local account can only be live or departed, never Paused. - Directory accounts already have the full disabled behaviour (#857, #862): - Paused: public links into the Personal area answer 404, Space links keep working and are flagged, internal grants keep working; - not listed as departed, and refused as a transfer target; - a DISABLED badge in Users & access. ## Why it matters - Offboarding or a suspected compromise often needs "stop access now, decide later" without freezing shares as departed or starting an estate transfer. For local accounts the only tool today is deletion, which is the heavy, irreversible-feeling path. - This makes local accounts behave the same as directory accounts, which the admin and policy docs already describe. ## Scope to decide when this is worked on - What disable does at once: end browser sessions (generation bump) and refuse sign-in, Basic and app passwords. Are app passwords kept but refused while disabled (like a directory-disabled user), or revoked (#851)? - It should reuse the #857 Paused semantics unchanged, with the oracle returning Disabled for a flagged local account. - Who can be disabled: - not yourself; - not the last local admin (the break-glass rule); - `auth.users` config accounts are not affected, since they are managed in the config file. - UI: the row-menu entry "Disable account" / "Enable account", the DISABLED badge (as for directory accounts), and a confirmation dialog in the #851 style. - Audit verbs (admin tier), a bell item for the user on re-enable or not, and whether disabled accounts count toward the 50-account limit or seats. - Docs: users-access.md, admin-policy.md. Research first (others: Nextcloud "disable user", ownCloud, Seafile "inactive", Synology). Then ask the open decisions. A mockup is needed before any UI work.
Author
Owner

Research (2026-10-10)

Compared Nextcloud, ownCloud/OpenCloud, Seafile, Synology DSM, Entra/M365, Google Workspace and Keycloak. The full report with sources is in scratch at b7e/865-research.md.

Question What others do Recommendation
App passwords 5 keep them and refuse every credential while the account is disabled; 2 revoke them Keep them but refuse them, with no cache window. Offer an optional "Also revoke" checkbox, unticked by default.
Self / last admin Nextcloud's code and Entra block disabling yourself. Entra protects the last Global Administrator. Block disabling yourself and the last enabled local admin.
Seats / account limit Seafile and Nextcloud don't count disabled accounts. Google and M365 still bill them (SaaS). Disabled accounts don't count. Re-enabling checks the limit again.
Notify the person 0 of 7 products send mail by default. 3 show a message at sign-in. Missing audit events are a documented complaint (Keycloak #48855). No mail and no bell item. Show a sign-in message after a correct password. Audit both transitions.
Wording 5 use Disable/Enable, 1 Deactivate, Google Suspend/Reactivate "Disable account" / "Enable account", with the confirm button repeating the verb
Public links Nextcloud stops them, which leads to "links suddenly stopped" complaints; Google keeps them Reuse the #857 Paused rules unchanged: links to Personal files answer 404, links to Spaces and internal shares keep working. The dialog says so.

The mockup is 865-disable-local-account-mockup.html in design-direction-decision-needed. It shows the badge and menu entries, the disable and enable dialogs, the self and last-admin refusal, the sign-in message and the audit events.

## Research (2026-10-10) Compared Nextcloud, ownCloud/OpenCloud, Seafile, Synology DSM, Entra/M365, Google Workspace and Keycloak. The full report with sources is in scratch at `b7e/865-research.md`. | Question | What others do | Recommendation | |---|---|---| | App passwords | 5 keep them and refuse every credential while the account is disabled; 2 revoke them | Keep them but refuse them, with no cache window. Offer an optional "Also revoke" checkbox, unticked by default. | | Self / last admin | Nextcloud's code and Entra block disabling yourself. Entra protects the last Global Administrator. | Block disabling yourself and the last enabled local admin. | | Seats / account limit | Seafile and Nextcloud don't count disabled accounts. Google and M365 still bill them (SaaS). | Disabled accounts don't count. Re-enabling checks the limit again. | | Notify the person | 0 of 7 products send mail by default. 3 show a message at sign-in. Missing audit events are a documented complaint (Keycloak #48855). | No mail and no bell item. Show a sign-in message after a correct password. Audit both transitions. | | Wording | 5 use Disable/Enable, 1 Deactivate, Google Suspend/Reactivate | "Disable account" / "Enable account", with the confirm button repeating the verb | | Public links | Nextcloud stops them, which leads to "links suddenly stopped" complaints; Google keeps them | Reuse the #857 Paused rules unchanged: links to Personal files answer 404, links to Spaces and internal shares keep working. The dialog says so. | The mockup is `865-disable-local-account-mockup.html` in design-direction-decision-needed. It shows the badge and menu entries, the disable and enable dialogs, the self and last-admin refusal, the sign-in message and the audit events.
Author
Owner

Decisions (Nikola, 2026-10-12): mockup approved, recommendations accepted.

  • Disabling a local account does the following:
    • ends browser sessions now;
    • refuses every sign-in (password, Basic/WebDAV, app passwords);
    • keeps app passwords but refuses them, with an optional "Also revoke" checkbox that is unticked by default.
  • It reuses the #857 Paused rules unchanged:
    • public links to Personal files answer 404;
    • Space links and internal shares keep working;
    • a disabled account is not listed as departed and is not offered as a transfer target.
  • You can't disable yourself or the last enabled local admin. Config-file accounts are not affected.
  • Disabled accounts don't count toward the account limit or seats. Enabling checks the limit again.
  • The person gets no mail and no bell item. After a correct password, sign-in shows "This account is disabled. Contact your administrator." Both changes are audited (account-disabled / account-enabled).
  • Wording: "Disable account…" / "Enable account…". The DISABLED badge matches directory accounts. Make admin is hidden on a disabled row.

Work starts now (batch-v07g, v0.6.329).

**Decisions (Nikola, 2026-10-12): mockup approved, recommendations accepted.** - Disabling a local account does the following: - ends browser sessions now; - refuses every sign-in (password, Basic/WebDAV, app passwords); - keeps app passwords but refuses them, with an optional "Also revoke" checkbox that is unticked by default. - It reuses the #857 Paused rules unchanged: - public links to Personal files answer 404; - Space links and internal shares keep working; - a disabled account is not listed as departed and is not offered as a transfer target. - You can't disable yourself or the last enabled local admin. Config-file accounts are not affected. - Disabled accounts don't count toward the account limit or seats. Enabling checks the limit again. - The person gets no mail and no bell item. After a correct password, sign-in shows "This account is disabled. Contact your administrator." Both changes are audited (`account-disabled` / `account-enabled`). - Wording: "Disable account…" / "Enable account…". The DISABLED badge matches directory accounts. Make admin is hidden on a disabled row. Work starts now (batch-v07g, v0.6.329).
Cordy referenced this issue from a commit 2026-10-12 12:41:48 +00:00
Cordy closed this issue 2026-10-12 12:44:54 +00:00
Author
Owner

Shipped in v0.6.329 (PR #878). Both dogfoods are bumped, and their sign-in pages carry the new account-disabled message.

The live check is still to do, and it needs Nikola signed in as admin:

  • Disable test-local (no checkbox ticked). The badge and dialog should show, and its open session should end.
  • Sign in as test-local with the right password: the "disabled" message should appear. With a wrong password: the normal message.
  • Re-enable it and sign in again.
  • Check the audit entries.
Shipped in v0.6.329 (PR #878). Both dogfoods are bumped, and their sign-in pages carry the new `account-disabled` message. The live check is still to do, and it needs Nikola signed in as admin: - Disable `test-local` (no checkbox ticked). The badge and dialog should show, and its open session should end. - Sign in as `test-local` with the right password: the "disabled" message should appear. With a wrong password: the normal message. - Re-enable it and sign in again. - Check the audit entries.
Author
Owner

Live test on files-bao (Nikola + Claude, 2026-10-12) on v0.6.329

  • Disable dialog: matched the mockup. sharer1 had no app passwords, so no app-password row or checkbox appeared.
  • Row after disabling: DISABLED badge, "disabled 2026-10-12 by nikola-test", count dropped to 1 of 50.
  • Sign-in while disabled:
    • The correct password showed "This account is disabled…".
    • A wrong password gave the normal "invalid credentials".
    • Changing the password while disabled worked: the new password got the disabled message, a wrong one got the invalid message.
  • Audit: account-disabled user=sharer1 sessions=0 appPasswords=kept, then account-enabled user=sharer1.

Follow-ups from Nikola, shipped in v0.6.330 (PR #879)

  • One rule for three actions. Delete, "Remove admin" and disable now all refuse the last enabled local administrator. Before this, delete and demote only checked the total across all sources, so the only local admin could be deleted while a directory admin existed. The check runs atomically, and a refused delete keeps the account's app passwords.
  • Reasons on hover/focus. The reason is now a tooltip, readable by screen readers, instead of a line printed under the greyed-out entry.
  • Labels. "Disable account" / "Enable account" no longer end in "…".
  • Font. The sign-in message uses the normal font instead of monospace, on all three pages.

v0.6.330 is live on both dogfoods; the new message style is confirmed on both sign-in pages.

## Live test on files-bao (Nikola + Claude, 2026-10-12) on v0.6.329 - **Disable dialog:** matched the mockup. sharer1 had no app passwords, so no app-password row or checkbox appeared. - **Row after disabling:** DISABLED badge, "disabled 2026-10-12 by nikola-test", count dropped to 1 of 50. - **Sign-in while disabled:** - The correct password showed "This account is disabled…". - A wrong password gave the normal "invalid credentials". - Changing the password while disabled worked: the new password got the disabled message, a wrong one got the invalid message. - **Audit:** `account-disabled user=sharer1 sessions=0 appPasswords=kept`, then `account-enabled user=sharer1`. ## Follow-ups from Nikola, shipped in v0.6.330 (PR #879) - **One rule for three actions.** Delete, "Remove admin" and disable now all refuse the last enabled local administrator. Before this, delete and demote only checked the total across all sources, so the only local admin could be deleted while a directory admin existed. The check runs atomically, and a refused delete keeps the account's app passwords. - **Reasons on hover/focus.** The reason is now a tooltip, readable by screen readers, instead of a line printed under the greyed-out entry. - **Labels.** "Disable account" / "Enable account" no longer end in "…". - **Font.** The sign-in message uses the normal font instead of monospace, on all three pages. v0.6.330 is live on both dogfoods; the new message style is confirmed on both sign-in pages.
Sign in to join this conversation.
No labels
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#865
No description provided.