Skip to content

[WTH-53] 릴리즈 노트 API 구현 - #142

Open
woneeeee wants to merge 8 commits into
devfrom
feat/WTH-53-릴리즈-노트-API

Hidden character warning

The head ref may contain hidden characters: "feat/WTH-53-\ub9b4\ub9ac\uc988-\ub178\ud2b8-API"
Open

woneeeee wants to merge 8 commits into
devfrom
feat/WTH-53-릴리즈-노트-API

Conversation

@woneeeee

@woneeeee woneeeee commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

📌 Summary

어떤 작업인지 한 줄 요약해 주세요.

서비스 전역 업데이트 소식(릴리즈 노트)을 작성·조회하는 API 구현 — 공개 조회(비로그인 포함) + DEVELOPER 전용 백오피스.

📝 Changes

변경사항을 what, why, how로 구분해 작성해 주세요.

What

  • 플랫폼 권한 PlatformRole { DEVELOPER } + User.platformRole, GET /api/v4/users/me/profiles 응답에 platformRole 노출
  • 릴리즈 노트 도메인(엔티티 상태전이 publish/unpublish/update · 리포지토리 · 요약 추출기)
  • 공개 조회 API(비로그인 허용): GET /api/v4/release-notes(목록, keyword 검색, size 12), GET /api/v4/release-notes/{id}(상세) — 항상 PUBLISHED만, DRAFT는 404
  • 백오피스 API(DEVELOPER 전용): /api/v4/admin/release-notes 목록/상세(DRAFT 포함)·작성·수정(PUT)·상태변경(PATCH)·삭제
  • FileOwnerType.RELEASE_NOTE 추가(기존 presigned URL 재사용) · Flyway V23/V24/V25

Why

  • 서비스 전역 업데이트 소식을 서비스 안에서 작성/노출하기 위함(채널톡 업데이트 사이트 형태)
  • 릴리즈 노트는 동아리와 무관한 플랫폼 전역 콘텐츠라 경로에 clubId를 두지 않고, 동아리 단위 Role(LEAD/ADMIN) 대신 플랫폼 권한(platformRole) 으로 작성 권한을 판단
  • 작성 권한은 반드시 서버에서 검증(프론트 버튼 숨김은 UX 용도)

How

  • DEVELOPER 권한 검증을 애플리케이션 레이어(PlatformPermissionValidator)에서 수행: JWT가 토큰 타입만 authority로 싣는 구조라 Spring Security hasRole로 불가 → 기존 admin 패턴(ClubPermissionPolicy.requireAdmin)과 동일하게 처리. 미로그인 401 / 권한 없음 403
  • 공개 조회는 SecurityConfig에서 GET만 permitAll, DRAFT는 어떤 경로로도 노출 안 함(404)
  • summary는 외부 HTML 파서 의존성 없이 태그 제거 후 앞 100자. content 서버 sanitize는 작성자가 신뢰된 DEVELOPER뿐이라 1차 범위에서 생략
  • 정렬: 공개 목록 COALESCE(releasedAt, publishedAt) DESC, 백오피스 createdAt DESC
  • 커밋 7개(의존성 순서)로 분리

📸 Screenshots / Logs

필요시 스크린샷 or 로그를 첨부해주세요.

image image

💡 Reviewer 참고사항

리뷰에 참고할 내용을 작성해주세요.

  • DEVELOPER 권한을 Security가 아닌 애플리케이션 레이어에서 검증하는 이유(JWT authority 구조) 확인 부탁드립니다.
  • 배포 시 Flyway V23~V25 적용됩니다(기존 최신 V22). file.owner_type은 네이티브 MySQL ENUM이라 RELEASE_NOTE 추가 마이그레이션(V25)이 포함됩니다.
  • DEVELOPER 권한 부여 화면은 1차 범위 밖 → 운영에서는 DB로 직접 지정합니다.
  • content 서버 sanitize는 신뢰된 작성자 전제로 생략 — 추후 외부 작성 허용 시 재검토 필요합니다.
  • 범위 밖(명세 1차 범위 밖): 안 읽음 뱃지, 권한 부여/회수 UI, 대상 버전·클럽별 노출 제어, 노트 수정 이력.

✅ Checklist

  • PR 제목 설정 완료 (WTH-53 릴리즈 노트 API 구현)
  • 테스트 구현 완료
  • 리뷰어 등록 완료
  • 자체 코드 리뷰 완료

🤖 Generated with Claude Code

woneeeee and others added 7 commits November 16, 2026 20:42
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2833efdb-bf47-4402-9e72-c60faefaf6d4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the ✨ Feature 새로운 기능 추가 label Nov 16, 2026
@woneeeee woneeeee changed the title feat: 릴리즈 노트 API 구현 (WTH-53) [WTH-53] 릴리즈 노트 API 구현 Nov 16, 2026
@woneeeee
woneeeee requested review from hyxklee and soo0711 November 16, 2026 11:50
@woneeeee woneeeee self-assigned this Nov 16, 2026
@field:NotBlank
val content: String,
@field:Schema(description = "카드 썸네일 이미지 URL. 없으면 기본 그라데이션 노출.", example = "https://...", nullable = true)
val thumbnailUrl: String? = null,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

URL이 이대로 박히면 CDN 적용도 가능 한가염??
기존에 File 쪽 썻던 코드랑 다른 것 같아서염

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

좋은 지적 감사합니다 🙏 기존 File 컨벤션(storageKey 저장 → FileAccessUrlPort.resolve()로 조회 URL 변환)과 어긋나 있었습니다. 다음과 같이 반영했습니다 (9164e06):

  • 엔티티는 전체 URL이 아니라 thumbnailStorageKey(S3 키)를 저장
  • 요청은 다른 이미지 업로드와 동일하게 FileSaveRequest(thumbnail)로 받음
  • 응답의 thumbnailUrl은 FileAccessUrlPort.resolve()로 변환 → CDN 적용/도메인 교체 가능
  • 마이그레이션(V23) 컬럼도 thumbnail_storage_key로 변경

덕분에 File 쪽과 일관되게 맞췄습니다. 감사합니다!

전체 URL 대신 storageKey를 저장하고 FileAccessUrlPort로 변환해 CDN 적용이 가능하도록 기존 File 컨벤션에 맞춤 (리뷰 반영)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fun toListResponse(profiles: List<UserProfileResponse>): UserProfilesResponse = UserProfilesResponse(profiles)
fun toListResponse(
profiles: List<UserProfileResponse>,
platformRole: PlatformRole? = null,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

여기에서 얘를 반환해줘야하는 이유가 있나여??
다른 쪽까지 다 나갈 것 같은데

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

확인해봤는데 me/profiles 한 군데에서만 쓰여서 다른 유저들한테는 새진 않는다고 합니다...! 근데 프로필 목록 응답에 계정 필드 끼는게 조금 어색한 것 같아서 유저 단위 응답으로 빼는 게 깔끔할 것 같은데 선호하는 위치가 있으실까요?_?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants