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/#100 배포환경을 위한 코드 수정 및 어드민 계정 생성 #101

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

runtime-zer0
Copy link
Contributor

@runtime-zer0 runtime-zer0 commented Jul 22, 2024

#️⃣연관된 이슈

이슈번호: #100

📝작업 내용

배포환경을 위한 코드 수정 및 어드민 계정 생성

배포환경을 위한 어드민 계정 생성

  • MemberService.java

    • 애플리케이션 시작시 자동으로 관리자 계정 생성을 위한 createAdminAccount() 구현
  • InitializerConfig.java

    • 애플리케이션 시작시 자동으로 관리자 계정 생성 메서드를 호출하기 위한 initializer() 메서드 구현

배포환경 버그 수정을 위한 테스트 코드 삭제

  • MemberTest.java
    • CI/CD Merge시 해당 테스트 코드로 인해 정상적으로 Merge 되지 않으므로 테스트 코드 작성을 보류하여 MemberTest.java 삭제

사용자 요청 작업 처리시 일관된 응답 제공을 위한 코드 리팩토링

  • CustomAccessDeniedHandler.java

    • status 필드, status 필드값 failure 추가
  • CustomAuthenticationEntryPoint.java

    • status 필드, status 필드값 failure 추가

💬리뷰 요구사항(선택)

  • 배포환경에서 원활한 테스트를 위해 애플리케이션 시작시 관리자 계정을 자동으로 생성하는 로직을 구현했습니다. 해당 계정은 ADMIN 권한을 가진 사용자를 만들기 위함이 아니라 회원가입을 하지 않고 로그인을 하기위한 로직이라고 생각하시면 됩니다.
  • 회의를 통해서 공지했던 대로 기존의 테스트 코드를 삭제하였습니다.
  • 사용자 요청 작업 처리시 일관된 응답을 제공하기 위하여 추가로 리팩토링 하였습니다.

- MemberService.java
- 애플리케이션 시작시 자동으로 관리자 계정 생성을 위한 createAdminAccount() 구현

- InitializerConfig.java
- 애플리케이션 시작시 자동으로 관리자 계정 생성 메서드를 호출하기 위한 initializer() 메서드 구현
- MemberTest.java
- CI/CD Merge시 해당 테스트 코드로 인해 정상적으로 Merge 되지 않으므로 테스트 코드 작성을 보류하여 MemberTest.java 삭제
- CustomAccessDeniedHandler.java
- status 필드, status 필드값 failure 추가

- CustomAuthenticationEntryPoint.java
- status 필드, status 필드값 failure 추가
@runtime-zer0 runtime-zer0 added bug 뭔가가 작동하지 않는 경우 feat 새로운 기능 또는 요청 refactoring 코드 리팩토링 remove 파일을 삭제하는 작업만 수행한 경우 !HOTFIX 급하게 치명적인 버그를 고쳐야 하는 경우 labels Jul 22, 2024
@runtime-zer0 runtime-zer0 added this to the 3차 기능 구현 milestone Jul 22, 2024
@runtime-zer0 runtime-zer0 requested a review from geunhokinn July 22, 2024 11:47
@runtime-zer0 runtime-zer0 self-assigned this Jul 22, 2024
@runtime-zer0 runtime-zer0 requested review from meanzi3 and serahissomi and removed request for geunhokinn and meanzi3 July 22, 2024 11:47
@runtime-zer0 runtime-zer0 merged commit 3fde5e9 into main Jul 22, 2024
@runtime-zer0 runtime-zer0 changed the title Feature/#100 Feature/#100 배포환경을 위한 코드 수정 및 어드민 계정 생성 Jul 22, 2024
@runtime-zer0
Copy link
Contributor Author

@geunhokinn @serahissomi @meanzi3
확인 부탁드리겠습니다 :)

0,
null,
null,
MemberRole.USER,
Copy link
Contributor

Choose a reason for hiding this comment

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

관리자 계정이라고 하셨는데 MemberRole이 user로 작성되었습니다

Copy link
Contributor Author

Choose a reason for hiding this comment

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

해당 로직을 구현한 이유가 로그인의 편의성을 위해 일시적으로 활용하기 위한 로직이라 해당 코드처럼 작성하였습니다.
ADMIN 권한을 가진 사용자를 만들기 위함이 아니라 회원가입을 하지 않고 로그인을 하기위한 로직이라고 생각하시면 될것같습니다.
해당 내용은 리뷰 요구사항에 추가하도록 하겠습니다.
좋은 피드백 감사드립니다 :)

Copy link
Contributor

Choose a reason for hiding this comment

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

아하 알겠습니다 이해했습니다!

@geunhokinn
Copy link
Contributor

확인했습니다. 고생하셨습니다!

Copy link
Contributor

@geunhokinn geunhokinn left a comment

Choose a reason for hiding this comment

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

추가 리뷰 드립니다!

"admin",
"[email protected]",
"01012345678",
"서울 특별시",
Copy link
Contributor

Choose a reason for hiding this comment

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

오타가 발견되었습니다. "서울 특별시" -> "서울특별시"로 수정이 필요합니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

확인했습니다.
수정하도록 하겠습니다 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 뭔가가 작동하지 않는 경우 feat 새로운 기능 또는 요청 !HOTFIX 급하게 치명적인 버그를 고쳐야 하는 경우 refactoring 코드 리팩토링 remove 파일을 삭제하는 작업만 수행한 경우
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants