Skip to content
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

[7주차] : 개발 사항 Merge(weekly-7 → develop) #59

Merged
merged 13 commits into from
Oct 22, 2023
Merged

Conversation

rktdnjs
Copy link
Contributor

@rktdnjs rktdnjs commented Oct 22, 2023

PR 타입(하나 이상의 PR 타입을 선택해주세요)

  • 기능 추가
  • 기능 삭제
  • 버그 수정
  • CSS등 UI 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트

작업 사항

  • 공고 작성 페이지 일부 버그 fix
  • 로그인 & 접근권한 체크 컴포넌트 ProtectedRoute.jsx 구현
    • 로그인 유무는 localStorage의 accessToken을 통해 확인
    • 접근권한 체크는 localStoragegrade를 통해 확인
    • 접근권한은 해당 컴포넌트로 감싼곳에서 ProtectedRoutepropsrequiredAuth 값을 배열형태로 제공하면 적용
    • 접근권한을 따로 제공하지 않으면 로그인 유무만 판단한다고 생각하면 됨
    • 로그인 + 접근권한을 둘 다 체크해야하는 곳에서는 로그인(1순위) - 접근권한(2순위)로 적용됨
    • 로그인 x 인 경우에는 로그인 경고 메시지와 함께 로그인페이지로 이동
    • 접근권한 x 인 경우에는 접근 거부 메시지와 함께 마이페이지로 이동(학생증 인증 권유)

관련 이슈

rktdnjs and others added 13 commits October 15, 2023 12:30
[6주차] : 개발 사항 Merge(develop → master)
- 로그인 유무는 localStorage의 accessToken을 통해 확인
- 접근권한 체크는 localStorage의 grade를 통해 확인
- 접근권한은 해당 컴포넌트로 감싼곳에서 ProtectedRoute에 props로 requiredAuth 값을 배열형태로 제공하면 적용
- 접근권한을 따로 제공하지 않으면 로그인 유무만 판단한다고 생각하면 됨
- 로그인 + 접근권한을 둘 다 체크해야하는 곳에서는 로그인(1순위) - 접근권한(2순위)로 적용됨
- 로그인 x 인 경우에는 로그인 경고 메시지와 함께 로그인페이지로 이동
- 접근권한 x 인 경우에는 접근 거부 메시지와 함께 마이페이지로 이동(학생증 인증 권유)
- 현재는 임시 데이터로 저장하도록 구현
- 백엔드 API 연동이후 로그인 기능이 정상작동하면 accessToken, grade, username 저장하도록 변경 예정
[feat]: 공고 작성 페이지 버그 수정
[feat] : 로그인 로직 보완 & 로그인 및 접근권한 체크용 ProtectedRoute 컴포넌트 구현
@rktdnjs rktdnjs added the ✨ feature This feature will be developed label Oct 22, 2023
@rktdnjs rktdnjs self-assigned this Oct 22, 2023
@rktdnjs rktdnjs merged commit 93bb422 into develop Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature This feature will be developed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants