diff --git a/frontend/src/api/authUsers.ts b/frontend/src/api/authUsers.ts index 9498d3f..b252f81 100644 --- a/frontend/src/api/authUsers.ts +++ b/frontend/src/api/authUsers.ts @@ -27,6 +27,7 @@ export interface AuthUserUpdateRequest { has_write_access: boolean is_active?: boolean role?: string + password?: string } export interface AuthUsersListResponse { diff --git a/frontend/src/pages/ManageUsers.tsx b/frontend/src/pages/ManageUsers.tsx index 8cb304c..3dd59ca 100644 --- a/frontend/src/pages/ManageUsers.tsx +++ b/frontend/src/pages/ManageUsers.tsx @@ -165,6 +165,7 @@ export default function ManageUsers() { has_write_access: false, is_active: true, role: 'User', + password: '', }) const [grantFrontendPermission, setGrantFrontendPermission] = useState(false) @@ -701,6 +702,9 @@ const getDisplayRoleLabel = (user: UserResponse): string => { has_write_access: authEditForm.has_write_access, is_active: authEditForm.is_active, role: authEditForm.role, + password: authEditForm.password && authEditForm.password.trim() !== '' + ? authEditForm.password + : undefined, } await authUsersApi.updateUser(editingAuthUser.id, updateData) setEditingAuthUser(null) @@ -711,6 +715,7 @@ const getDisplayRoleLabel = (user: UserResponse): string => { has_write_access: false, is_active: true, role: 'User', + password: '', }) loadAuthUsers() } catch (err: any) { @@ -788,6 +793,7 @@ const getDisplayRoleLabel = (user: UserResponse): string => { has_write_access: user.has_write_access === true, is_active: user.is_active !== false, // Default to true if null/undefined role: userRole, + password: '', // Always start with empty password }) } @@ -1792,6 +1798,24 @@ const getDisplayRoleLabel = (user: UserResponse): string => { required /> +
+ Minimum 6 characters. Leave empty to keep the current password. +
+