8주차 미션 [민토리]#32
Open
SungMinju wants to merge 2 commits into
Open
Conversation
yangjiae12
approved these changes
May 23, 2026
Comment on lines
+21
to
+23
| User user = userRepository.findByEmail(email) | ||
| .orElseThrow(() -> new UsernameNotFoundException( | ||
| "해당 이메일의 사용자를 찾을 수 없습니다: " + email)); |
Member
There was a problem hiding this comment.
UsernameNotFoundException 메시지를 하드코딩하기보다는 UserErrorCode 등으로 관리하면 좋을 것 같습니다. 또한 입력 이메일이 예외 메시지에 그대로 포함되어 있어, 외부 노출 가능성을 고려하면 식별 정보는 제외하는 편이 더 안전해 보입니다!
Comment on lines
+22
to
+25
| @Override | ||
| public Collection<? extends GrantedAuthority> getAuthorities() { | ||
| return List.of(new SimpleGrantedAuthority("ROLE_USER")); | ||
| } |
Member
There was a problem hiding this comment.
현재 권한이 ROLE_USER로 고정되어 있는데, 이후 관리자나 사장님 등 역할이 나뉠 가능성이 있다면 User의 role 값을 기반으로 권한을 생성하는 방식도 고려해볼 수 있을 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚩 관련 이슈
📌 구현 결과
❓ 리뷰 요청
🤔 질문
💬 기타 공유 사항