fix: 근로자 공개 링크 API 3개에 /api/v1 접두사 누락 수정 - #149
Merged
BcKmini merged 1 commit intoAug 12, 2026
Merged
Conversation
WorkerLinkViewController·WorkerLinkDocumentController·WorkerResponseController가 다른 모든 컨트롤러와 달리 /api/v1 접두사 없이 매핑되어 있어, 클라이언트가 실제로 호출하는 /api/v1/public/worker-links/** 경로에서는 SecurityConfig의 permitAll 규칙이 매칭되지 않고 인증이 필요한 규칙으로 떨어졌다. 근로자가 링크로 안내를 조회하거나 서류를 제출하는 흐름 전체가 실제 배포 환경에서 항상 실패하는 상태였다. 세 컨트롤러 매핑과 SecurityConfig의 permitAll 매처에 /api/v1 접두사를 추가하고, 같은 버그를 잡아내지 못했던 통합 테스트의 경로도 실제 API와 일치시켰다. Fixes #148
hywznn
approved these changes
Aug 12, 2026
Contributor
|
감사합니다 |
hywznn
pushed a commit
that referenced
this pull request
Aug 12, 2026
* fix: WAITING_WORKER 데모 업무카드에 승인 이력 추가 여권 사본 제출 대기 등 WAITING_WORKER 상태로 시딩된 업무카드가 실제로는 APPROVED 단계를 거치지 않아 대응하는 ApprovalRequest가 없었고, 그 결과 근로자 보안 링크 발급·재발급이 항상 422(TASK_NOT_APPROVED)로 실패했다. transitionPath에 READY_FOR_REVIEW/APPROVED 단계를 추가하고 해당 업무들의 APPROVED 승인 이력을 시딩해 실제 애플리케이션 흐름과 일치시켰다. Fixes #146 * test: PostgreSQL 데모 시드 통합 테스트 카운트 갱신 WAITING_WORKER 업무 승인 이력 추가로 늘어난 approval_request/ task_transition_history/audit_event 카운트를 반영. * fix: 근로자 공개 링크 API 3개에 /api/v1 접두사 누락 수정 (#149) WorkerLinkViewController·WorkerLinkDocumentController·WorkerResponseController가 다른 모든 컨트롤러와 달리 /api/v1 접두사 없이 매핑되어 있어, 클라이언트가 실제로 호출하는 /api/v1/public/worker-links/** 경로에서는 SecurityConfig의 permitAll 규칙이 매칭되지 않고 인증이 필요한 규칙으로 떨어졌다. 근로자가 링크로 안내를 조회하거나 서류를 제출하는 흐름 전체가 실제 배포 환경에서 항상 실패하는 상태였다. 세 컨트롤러 매핑과 SecurityConfig의 permitAll 매처에 /api/v1 접두사를 추가하고, 같은 버그를 잡아내지 못했던 통합 테스트의 경로도 실제 API와 일치시켰다. Fixes #148 * fix: 병합 과정에서 유실된 markSentResponse 테스트 단계 복원
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
문제
#147을 라이브로 검증하던 중, 근로자 보안 링크를 실제로
/worker-portal/{token}에서 열면(로그아웃 상태) "요청 내용을 불러오지 못했습니다"가 뜨는 걸 발견했다 (#148).원인
WorkerLinkViewController(안내 조회),WorkerLinkDocumentController(서류 업로드),WorkerResponseController(응답 제출) — 근로자가 로그인 없이 접근하는 공개 API 3개가 다른 모든 컨트롤러와 달리/api/v1접두사 없이 매핑돼 있었다.SecurityConfig의 permitAll 매처도 동일하게 접두사 없이 정의돼 있어서 둘은 서로 일관됐지만, 클라이언트(workerLinks.ts)가 실제로 호출하는/api/v1/public/worker-links/**경로는 permitAll에 매칭되지 않고hasAnyRole(...)규칙으로 떨어져 항상 로그인을 요구했다. 서버 통합 테스트들도 접두사 없는 잘못된 경로를 그대로 테스트해서 이 불일치를 잡아내지 못하고 있었다.수정
WorkerLinkViewController/WorkerLinkDocumentController/WorkerResponseController매핑에/api/v1접두사 추가SecurityConfig의 permitAll 매처를/api/v1/public/worker-links/**로 수정WorkerLinkSecurityIntegrationTest,PostgreSqlRestrictedRoleHttpE2ETest의 경로 상수를 실제 API와 일치시킴검증
./gradlew test전체 통과 (H2 기준, Postgres 테스트는 CI에서 확인)/worker-portal/{token}접속 → 네팔어 안내문·요청 서류·"안내를 확인했습니다" 버튼까지 정상 렌더링 확인 (수정 전에는 "요청 내용을 불러오지 못했습니다"만 표시됐음)이 PR은 #147 브랜치 위에 쌓았다 (근로자 링크 발급 자체가 #147 없이는 데모에서 항상 422였음). #147이 main에 머지되면 base를 main으로 옮길게.
Test plan
./gradlew test전체 통과Closes #148