Skip to content

feat(users and groups): re-use add account dialog when editing accounts#59406

Open
pringelmann wants to merge 8 commits intomasterfrom
feat/40903/edit-user-dialog
Open

feat(users and groups): re-use add account dialog when editing accounts#59406
pringelmann wants to merge 8 commits intomasterfrom
feat/40903/edit-user-dialog

Conversation

@pringelmann
Copy link
Copy Markdown
Contributor

@pringelmann pringelmann commented Apr 2, 2026

Summary

Replaces inline user editing in Account management settings with a dialog. Clicking the "Edit" pencil icon on a user row now opens a modal form instead of making the row editable in-place.

Adds a new PATCH /cloud/users/{userId} endpoint that accepts multiple fields in a single request and validates them all before applying any changes. On validation failure, returns a per-field error map so the dialog can show errors inline.

Closes #40903

Changes

Backend (provisioning_api)

  • New editUserMultiField controller method - spec compliant PATCH semantics (null = not submitted),
    validate-then-apply, per-field errors
  • Authorization mirrors the existing editUser PUT: quota/manager restricted to admins and
    subadmins, delegated admins blocked from promoting to the admin group, force_language
    system config respected

Frontend (settings)

  • New EditUserDialog: structured snapshot + dirty detection,
    only sends changed fields
  • Shared UserFormFields used by both "Edit" and "Add" dialogs. Complex fields
    (groups, quota, language, manager) split into focused sub-components
  • provide/inject for shared form state across sub-components. This avoids prop drilling
    and vue/no-mutating-props lint violations
  • UserRow is now purely presentational (all inline editing code removed)

Screenshots

image
Kooha-2026-04-02-18-15-19.webm

Checklist

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
…oint

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Add atomic multi-field user update with collected validation errors,
IAppConfig migration, and corresponding Vuex store action/mutation.

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Replace inline row editing in user management with a modal dialog.
Extract shared form fields into UserFormFields with sub-components
(Groups, Quota, Language, Manager) using a single formData prop.
Normalize newUser shape to API-aligned field names.

Refs: #40903
-e
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Mirror editUser permission checks in editUserMultiField. Swap NcSelect
:user-select for NcSelectUsers. Extract helpers into userFormUtils.ts.
Simplify UserList form init, drop unused Vue import. Update E2E tests.
-e
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
…ield

Map empty string to userId since User::setDisplayName() rejects ""
-e
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann pringelmann force-pushed the feat/40903/edit-user-dialog branch from 86a44d9 to e435b4c Compare April 2, 2026 16:18
@pringelmann pringelmann added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 2, 2026
@pringelmann pringelmann marked this pull request as ready for review April 2, 2026 16:18
@pringelmann pringelmann requested review from a team as code owners April 2, 2026 16:18
@pringelmann pringelmann requested review from Altahrim, nfebe, salmart-dev, sorbaugh and szaimen and removed request for a team April 2, 2026 16:18
@pringelmann pringelmann changed the title Feat/40903/edit user dialog feat(users and groups): re-use add account dialog when editing accounts Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Re-use the new user modal to edit users (user management)

1 participant