Skip to content

Add account page with name edit and password management#76

Merged
ICubE01 merged 8 commits into
mainfrom
feature/account-page
Jun 19, 2026
Merged

Add account page with name edit and password management#76
ICubE01 merged 8 commits into
mainfrom
feature/account-page

Conversation

@ICubE01

@ICubE01 ICubE01 commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • New /account page: displays name (inline edit) and email; links to password change for password-based accounts
  • New /account/change-password page: form to change current password
  • NavBar redesigned: user dropdown (계정/로그아웃) and a home link that returns to the current room if in one
  • New GET /users/{id} endpoint returns full account profile (AccountDto) including linked identities

Backend

Features

  • GET /api/users/{id} — returns AccountDto { user: UserDto, identities: UserIdentityDto[] }
  • PATCH /api/users/{id}/password — changes password; throws NoPasswordException (400) for social-only accounts, WrongPasswordException (406) for wrong current password
  • UserDto expanded: id, name, email, hasPassword, createdAt
  • AccountDto aggregates UserDto + List<UserIdentityDto>

Refactor

  • UserController.isNotCurrentUserId helper centralises the ownership guard (was copy-pasted in each handler)
  • ConnectedIdentityResponse renamed to UserIdentityDto; SocialAuthController.getConnectedIdentities removed (now served via GET /users/{id})
  • DuplicateUserException renamed to DuplicateEmailException
  • UserMapper.toDto derives hasPassword from user.getPassword() != null

Frontend

Features

  • AccountPage.tsx — shows name (inline edit) and email from GET /users/{id}; links to /account/change-password for password accounts only
  • ChangePasswordPage.tsx — form with current/new/confirm password fields; redirects back to /account on success; guards: JS validation for empty current password, backend @NotBlank enforcement
  • NavBar.tsx — replaced settings gear with user-name dropdown; "Tichu Sim" home link navigates to current room (/rooms/:roomId) or / depending on route
  • types.ts — added UserDto, AccountDto, UserIdentityDto, OidcProviderName

@ICubE01
ICubE01 merged commit 4c70da3 into main Jun 19, 2026
2 checks passed
@ICubE01
ICubE01 deleted the feature/account-page branch June 19, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant