Skip to content

Commit

Permalink
[Feature/456] 탈퇴 후 재가입 검증에서 보틀 멤버를 제외한다 (#464)
Browse files Browse the repository at this point in the history
* feat: 탈퇴 후 48시간 재가입 방지 보틀 멤버 제외

* feat: 스크럼 스크립트 수정
  • Loading branch information
miseongk authored Sep 27, 2024
1 parent 6e35465 commit 1f86639
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/daily-scrum-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
"text": {
"type": "mrkdwn",
"text": "<@U07L8AX9B4N><@U07L87A3WKY><@U07LC3Q1MEH><@U07LHEEU2BW><@U07LESGBQEP><@U07LMP4PY0L><@U07LHAXGYBE><@U07L87GGHJS>\n\n
*:calendar: 보틀즈 데일리 스크럼 :calendar:*\n\n
:one: - 완료된 작업 내용\n\n
:two: - 오늘 해야 할 작업\n\n
:three: - 겪고 있는 문제나 도움이 필요한 사항\n\n
오늘의 TMI나 아무말도 좋아 :blob_aww: \n\n"
*:calendar: 보틀즈 데일리 스크럼 :calendar:*\n\n
:one: - 완료된 작업 내용\n\n
:two: - 오늘 해야 할 작업\n\n
:three: - 겪고 있는 문제나 도움이 필요한 사항\n\n
오늘의 TMI나 아무말도 좋아 :blob_aww: \n\n"
}
}
]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ jobs:
echo "export IS_MATCHING_ACTIVE=${{ secrets.IS_MATCHING_ACTIVE }}" >> /home/${{ secrets.SERVER_USER_NAME }}/deploy/env_vars.sh
echo "export SUPER_USER_NUMBER=${{ secrets.SUPER_USER_NUMBER }}" >> /home/${{ secrets.SERVER_USER_NAME }}/deploy/env_vars.sh
echo "export SUPER_USER_NUMBER_V2=${{ secrets.SUPER_USER_NUMBER_V2 }}" >> /home/${{ secrets.SERVER_USER_NAME }}/deploy/env_vars.sh
echo "export BOTTLES_NUMBER=${{ secrets.BOTTLES_NUMBER }}" >> /home/${{ secrets.SERVER_USER_NAME }}/deploy/env_vars.sh
echo "export APPLE_KEY_ID=${{ secrets.APPLE_KEY_ID }}" >> /home/${{ secrets.SERVER_USER_NAME }}/deploy/env_vars.sh
echo "export APPLE_KEY_ID_PATH=${{ secrets.APPLE_KEY_ID_PATH }}" >> /home/${{ secrets.SERVER_USER_NAME }}/deploy/env_vars.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class AuthFacade(
private val superUserNumber: String,
@Value("\${super-user-number-v2}")
private val superUserNumberV2: String,
@Value("\${bottles-number}")
private val bottlesNumber: String,
) {

private val log = KotlinLogging.logger { }
Expand Down Expand Up @@ -98,6 +100,7 @@ class AuthFacade(

private fun validateNotAbusing(phoneNumber: String?) {
if (phoneNumber != null) {
if (isBottlesMember(phoneNumber)) return
val allAccounts = userService.findAllByPhoneNumber(phoneNumber)
if (allAccounts.isNotEmpty()) {
val lastAccount = allAccounts.last()
Expand All @@ -110,6 +113,11 @@ class AuthFacade(
}
}

private fun isBottlesMember(phoneNumber: String): Boolean {
return bottlesNumber.split(",")
.contains(phoneNumber)
}

fun appleSignInUp(appleSignInUpRequest: AppleSignInUpRequest): AppleSignInUpResponse {
val applePublicKeys = webClientAdapter.sendAppleAuthKeysRequest()
val tokenHeaders = jwtTokenProvider.parseHeaders(appleSignInUpRequest.code)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ firebase:

super-user-number: ${SUPER_USER_NUMBER}
super-user-number-v2: ${SUPER_USER_NUMBER_V2}
bottles-number: ${BOTTLES_NUMBER}

apple-auth:
apple-url: https://appleid.apple.com
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
FCM_ADMIN_KEY_PATH: /app/config/bottles-firebase-adminsdk.json
SUPER_USER_NUMBER: ${SUPER_USER_NUMBER}
SUPER_USER_NUMBER_V2: ${SUPER_USER_NUMBER_V2}
BOTTLES_NUMBER: ${BOTTLES_NUMBER}
APPLE_KEY_ID: ${APPLE_KEY_ID}
APPLE_KEY_ID_PATH: /api/config/apple-auth-key.p8
APPLE_CLIENT_ID: ${APPLE_CLIENT_ID}
Expand Down Expand Up @@ -70,6 +71,7 @@ services:
FCM_ADMIN_KEY_PATH: /app/config/bottles-firebase-adminsdk.json
SUPER_USER_NUMBER: ${SUPER_USER_NUMBER}
SUPER_USER_NUMBER_V2: ${SUPER_USER_NUMBER_V2}
BOTTLES_NUMBER: ${BOTTLES_NUMBER}
APPLE_KEY_ID: ${APPLE_KEY_ID}
APPLE_KEY_ID_PATH: /api/config/apple-auth-key.p8
APPLE_CLIENT_ID: ${APPLE_CLIENT_ID}
Expand Down

0 comments on commit 1f86639

Please sign in to comment.