mirror of
https://github.com/Tony0410/nextstep.git
synced 2026-05-25 05:41:39 +08:00
Add admin panel with member management and password reset
Features: - Admin panel at /settings/members for workspace owners - View all workspace members with roles and last login - Create new users directly (with temporary password) - Change member roles (Owner/Editor/Viewer) - Reset user passwords (forces change on next login) - Remove members from workspace - Force password reset flow on login - Track last login timestamp for users API Routes: - GET/POST /api/workspaces/[id]/members - GET/PATCH/DELETE /api/workspaces/[id]/members/[memberId] - POST /api/workspaces/[id]/members/[memberId]/reset-password - POST /api/auth/change-password Schema changes: - Added lastLoginAt DateTime? to User model - Added forcePasswordReset Boolean to User model Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,14 @@ function LoginForm() {
|
||||
return
|
||||
}
|
||||
|
||||
// Check if user needs to change password
|
||||
if (data.forcePasswordReset) {
|
||||
showToast('Please change your password to continue', 'info')
|
||||
router.push('/change-password')
|
||||
router.refresh()
|
||||
return
|
||||
}
|
||||
|
||||
showToast('Welcome back!', 'success')
|
||||
// If there's a redirect param (e.g., from invite link), go there
|
||||
router.push(redirectTo || '/today')
|
||||
|
||||
Reference in New Issue
Block a user