-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 소셜 로그인 시 랜딩할 페이지 결정에 사용할 헤더 추가 #64
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
27 changes: 27 additions & 0 deletions
27
src/main/java/com/gdschongik/gdsc/global/security/LandingStatus.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.gdschongik.gdsc.global.security; | ||
|
||
import com.gdschongik.gdsc.domain.member.domain.Member; | ||
import com.gdschongik.gdsc.domain.member.domain.RequirementStatus; | ||
|
||
public enum LandingStatus { | ||
TO_STUDENT_AUTHENTICATION, // 재학생 인증 페이지로 랜딩 | ||
TO_REGISTRATION, // 가입신청 페이지로 랜딩 | ||
TO_DASHBOARD, // 대시보드로 랜딩 | ||
; | ||
|
||
public static LandingStatus of(Member member) { | ||
// 아직 재학생 인증을 하지 않았다면 재학생 인증 페이지로 랜딩 | ||
if (member.getRequirement().getUnivStatus() == RequirementStatus.PENDING) { | ||
return TO_STUDENT_AUTHENTICATION; | ||
} | ||
|
||
// 재학생 인증은 했지만 가입신청을 하지 않았다면 가입신청 페이지로 랜딩 | ||
// 가입신청 여부는 학번 존재여부로 판단 | ||
if (member.getStudentId() == null) { | ||
return TO_REGISTRATION; | ||
} | ||
|
||
// 재학생 인증과 가입신청을 모두 완료했다면 대시보드로 랜딩 | ||
return TO_DASHBOARD; | ||
} | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
멤버에 이 부분 확인하는 용도의 다른 필드가 있는 것보다 이렇게 학번으로 확인하는게 좋을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
가입신청 상태만 따로 관리하는 필드가 있으면 가능할 것 같은데...
저희가 가입신청 상태를 멤버역할과 통합해서 관리하고 있고,
이때 가입신청서를 작성했든 작성하지 않았든 같은 GUEST라서 구별이 어려운 것 같아요
그래서 가입신청서 작성할 때 필드값 업데이트 치니까 필드값 null 여부로 판단한거긴 한데... 좀 마음에 안들긴 하죠
가입신청상태와 멤버상태를 분리할 수 있으면 좋긴 하겠네요. 더 명확하기도 하고요
일단 급하니까 임시로 필드값 널 여부로 처리하는 게 맞을 것 같아요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여유가 있으면 분리하는게 좋을 것 같긴한데
일단은 이렇게 가고 이슈 새로 만들어서 나중에 여유가 생기면 처리해도 좋을 것 같습니다.
내부 구현이라 프론트 쪽에 영향이 있는 것도 아니니까요