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

Feature/어드민페이지 url로 접근가능 #888 #893

Merged

Conversation

jasper200207
Copy link
Collaborator

연관 이슈

작업 요약

어드민페이지 등 권한이 없어도 페이지에 접속되는 문제 해결

작업 상세 설명

  • NeedLogin, NeedAuth 컴포넌트를 통해 페이지가 렌더링 되기 전 localstorage의 권한을 확인하도록 설정
  • 기존에도 api에서 막고 있었기에 프론트에서 경고 띄우기 및 한번 더 거르는 역할

리뷰 요구사항

  • 리뷰 예상 시간 : 10분

Preview 이미지

스크린샷 2024-03-26 오후 3 21 51 스크린샷 2024-03-26 오후 3 22 11

- NeedAuth : 특정 권한이 없을 시 메인으로 리다이렉팅
- NeedLogin : 로그인 상태가 아닐 시 로그인으로 리다이렉팅
- #888
- NeedAuth는 회장과 부회장은 무조건 허용하도록 수정
- #888
Copy link
Collaborator

@llddang llddang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!

Comment on lines +9 to +12
const checkLogin = useMemo(() => {
return () => member !== null;
}, [member]);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useMemo() 굿입니당!

@jasper200207 jasper200207 merged commit 6f79dbc into develop Mar 28, 2024
1 check passed
@jasper200207 jasper200207 deleted the feature/어드민페이지_URL로_접근가능_#888 branch March 28, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 버그
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[BUG] 어드민 페이지 url로 접근 가능
2 participants