[AGE-2166] Add Reset Password Functionality to Workspace UI
Overview
We want to add the reset password functionality in the UI under workspace settings. This will allow any user to reset passwords for users in their workspace.
Background
The backend API for password reset is already implemented and available in OSS . In the OSS version, any authenticated user can reset another user's password.
UI Implementation
- Add a "Reset Password" element in the pannel (see screenshot) next to each user in the table
- When clicked, display a confirmation dialog explaining that this will create a password reset link
- Upon confirmation, call the reset password API endpoint
- Show appropriate the password reset linkafter the API cal
Technical Details
API Endpoint
- Endpoint:
POST /reset-password - Parameters:
user_id: The ID of the user whose password will be reset
- Authentication: Requires authentication token in the request header
- Response: Returns the reset password link ( or a success message
From SyncLinear.com | AGE-2166
Hi @mmabrouk ,
I'd like to work on this issue. I've analyzed the codebase extensively and discovered that most of the UI components are already implemented but not integrated. Here's my implementation strategy:
Current Status Analysis
- ✅
GenerateResetLinkModalandPasswordResetLinkModalcomponents exist - ✅ Type definitions are already in place
- ❌ API service function needs to be added
- ❌ Reset button needs integration in the Actions dropdown
- ❌ Modal integration with WorkspaceManage component
Implementation Approach
1. API Integration (web/oss/src/services/workspace/api/index.ts)
export const resetUserPassword = async ({
orgId,
workspaceId,
userId,
}: {
orgId: string
workspaceId: string
userId: string
}): Promise<{reset_link: string}> => {
const {data} = await axios.post(`/reset-password`, {
user_id: userId,
})
return data
}
- UI Integration (web/oss/src/components/pages/settings/WorkspaceManage/cellRenderers.tsx)
Add reset password option to the Actions dropdown for active members only Integrate existing modals with proper state management Follow existing patterns for loading states and error handling
- Testing
Add Playwright E2E tests covering the reset password workflow
Questions:
Should the reset password option be available for all member roles, or only specific ones? Any specific error handling requirements beyond the existing patterns?
I can have this implemented within 24-48 hours following the established codebase patterns. Would you like me to proceed?