Skip to content

[Feat] - 관리자 공개 코스 삭제 권한 추가#168

Merged
thingineeer merged 4 commits intodevfrom
feat/#168-admin-delete
Feb 19, 2026
Merged

[Feat] - 관리자 공개 코스 삭제 권한 추가#168
thingineeer merged 4 commits intodevfrom
feat/#168-admin-delete

Conversation

@thingineeer
Copy link
Contributor

@thingineeer thingineeer commented Feb 19, 2026

😶 무슨 이슈인가요?


closes #168

iOS 개발자 모드에서 타인의 공개 코스를 삭제하려 하면 서버에서 403 Forbidden이 반환되는 이슈가 있었습니다.
관리자(userId: 280)가 모든 공개 코스를 삭제할 수 있도록 권한 예외 처리가 필요. -> 개발자 모드 만들었어요

🤔 어떻게 이슈를 해결했나요?


  • PublicCourseService.deletePublicCourses()의 소유자 검증 로직에서 관리자 userId(280L)를 예외 처리
  • boolean isAdmin = userId.equals(280L) 플래그 추가 후, filter 조건에서 관리자일 경우 소유자 검증 우회
  • 비관리자는 기존과 동일하게 본인 코스만 삭제 가능 (403 반환)

🤯 주의할 점이 있나요?

딱히 업습니다~

  • 변경 범위: 1파일, 2줄 추가 (최소 변경)
  • iOS 클라이언트 수정 불필요 — 기존 PUT /api/public-course 엔드포인트 그대로 사용
  • 테스트 서버 없어 프로덕션 직접 배포 → 최소 변경으로 리스크 최소화

funnysunny08 and others added 4 commits March 9, 2024 19:21
* [Feat] 센트리 세팅 (#152)

* feat: sentry 세팅

* feat: sentry 세팅

* fix: sentry 버전 수정

* fix: Sentry 설정 변경

* feat: 코스 상세 조회에서 작성자와 접속 유저 비교하는 필드 추가 (#154)
- userId 280(관리자)에 대해 공개 코스 삭제 시 소유자 검증 우회
- 비관리자 기존 동작 유지
@thingineeer thingineeer self-assigned this Feb 19, 2026
@thingineeer thingineeer merged commit 1fd0a0a into dev Feb 19, 2026
1 of 2 checks passed
thingineeer added a commit that referenced this pull request Feb 19, 2026
[Fix] - 공개 코스 삭제 시 FK 제약 위반 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments