Share one user form, add user photos and Revoke, confirm every form
- Settings > Users uses the people UserForm (useFormInit) instead of its own copy; it saves in one request through users/save-user, which now takes an optional profile photo (setUserProfileImage) - Revoke action on user rows adds the revoked type, as the edit form would - Every admin form asks for confirmation before it saves Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -22,6 +22,10 @@ export const SaveUserRequestSchema = z
|
||||
* as they are.
|
||||
*/
|
||||
user_types: z.array(z.enum(UserTypes.map((type) => type.value))).default([]),
|
||||
/**
|
||||
* A new profile photo as a base64 data URL; left out keeps theirs.
|
||||
*/
|
||||
image: z.string().startsWith("data:image/", "Pick an image").nullish(),
|
||||
})
|
||||
.refine((data) => data.password == data.confirm_password, {
|
||||
message: "The passwords don't match",
|
||||
|
||||
Reference in New Issue
Block a user