VAPP-21: User editing: real name, email, site admin toggle, clear 2FA, force password change #26
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/user-editing-vapp-21"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves VAPP-21.
What
Extends the Users edit drawer (
src/components/pages/users.rs) so admins can manage an account after creation, beyond the existing password reset and mesh membership.Account section (new)
Real name input, email input, and a "Site administrator (full rights)" checkbox matching the create dialog's wording, seeded from the loaded
Userrow. Save wraps a newedit_userserver fn over vervain-server'seditusercontrol action and refreshes the user list via the existingon_changedcallback so the table reflects the new name / role.The site-admin checkbox is disabled when the target is the signed-in user, so an admin cannot strip their own rights mid-session. The new
get_current_user_idserver fn readsuserinfo._idfrom the control-channel connect burst to make that comparison.Reset password section
Gains two checkboxes, "Also clear two-factor enrollment" and "Require password change at next sign-in", passed through the extended
set_user_password(nowremove_two_factor/reset_next_login) tochangeuserpass'sremoveMultiFactor/resetNextLogin. Clearing 2FA only exists onchangeuserpass, so it rides the password reset rather than a standalone action.Model / data
models::Usernow carries the rawsiteadminbitmap andlist_userspopulates it so the checkbox can seed from it. Field names (realname,email,siteadmin,removeMultiFactor,resetNextLogin) were verified against theControlIn::EditUser/ControlIn::ChangeUserPassserde definitions in vervain-server'suser_session.rs.Acceptance criteria
ErrorText)just checkpasses🤖 Generated with Claude Code