Skip to content

fix :: 주말급식 문제 해결#569

Merged
imhanseong merged 1 commit intodevelopfrom
568-주말-급식-공지-문제-해결
Dec 5, 2025

Hidden character warning

The head ref may contain hidden characters: "568-\uc8fc\ub9d0-\uae09\uc2dd-\uacf5\uc9c0-\ubb38\uc81c-\ud574\uacb0"
Merged

fix :: 주말급식 문제 해결#569
imhanseong merged 1 commit intodevelopfrom
568-주말-급식-공지-문제-해결

Conversation

@imhanseong
Copy link
Contributor

@imhanseong imhanseong commented Dec 5, 2025

Summary by CodeRabbit

릴리스 노트

  • New Features
    • 주말 식사 기간 관련 엔드포인트에 대한 접근 권한이 확대되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@imhanseong imhanseong self-assigned this Dec 5, 2025
@imhanseong imhanseong added the bug Something isn't working label Dec 5, 2025
@imhanseong imhanseong linked an issue Dec 5, 2025 that may be closed by this pull request
@coderabbitai
Copy link

coderabbitai bot commented Dec 5, 2025

개요

ROLE_STU 역할에 대한 PATCH 엔드포인트 접근 권한이 기존 "/notification/**"에서 "/weekend-meal/period" 경로를 추가하도록 확대되었습니다.

변경 사항

집단 / 파일(s) 변경 요약
보안 구성 업데이트
src/main/kotlin/dsm/pick2024/global/config/security/SecurityConfig.kt
ROLE_STU 사용자의 PATCH 접근 허용 경로에 "/weekend-meal/period" 엔드포인트 추가

예상 코드 검토 난이도

🎯 1 (간단함) | ⏱️ ~3분

  • 단일 파일의 최소한의 구성 변경
  • 새로운 엔드포인트 경로 추가로 인한 접근 제어 정책 변경 확인 필요

주말의 끼니, 한 주기를 설정하노니 🐰
학생들의 권한 늘어가며
보안의 문은 조용히 열려
한 줄의 변화가 모여
새로운 길을 만드나니 🌙

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 주말급식 관련 버그 수정을 명확하게 설명하고 있으며, 변경 내용의 주요 목적과 일치합니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 568-주말-급식-공지-문제-해결

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@imhanseong imhanseong merged commit 5ec9562 into develop Dec 5, 2025
1 of 2 checks passed
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 840634b and a2c5c49.

📒 Files selected for processing (1)
  • src/main/kotlin/dsm/pick2024/global/config/security/SecurityConfig.kt (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Check Code Quality

Comment on lines +129 to +130
"/notification/**",
"/weekend-meal/period"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "*.kt" | xargs rg -l "weekend.*meal" | grep -v node_modules | head -20

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 1913


🏁 Script executed:

rg -n --type=kotlin "weekend-meal/period" --no-heading -B 5 -A 5

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 2475


🏁 Script executed:

find . -type f -name "*Weekend*" -o -name "*Meal*" | grep -i kotlin

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 5936


🏁 Script executed:

cat -n src/main/kotlin/dsm/pick2024/domain/weekendmeal/presentation/WeekendMealController.kt

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 5360


🏁 Script executed:

rg -n --type=kotlin "@PatchMapping|@PostMapping|@GetMapping" src/main/kotlin/dsm/pick2024/domain/weekendmeal/presentation/WeekendMealController.kt -A 3

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 1953


🏁 Script executed:

cat -n src/main/kotlin/dsm/pick2024/domain/weekendmeal/presentation/dto/request/SettingWeekendMealPeriodRequest.kt

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 541


🏁 Script executed:

cat -n src/main/kotlin/dsm/pick2024/domain/weekendmeal/service/SettingWeekendMealPeriodService.kt | head -50

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 1803


Remove "/weekend-meal/period" from ROLE_STU PATCH permissions — this is an admin-only endpoint.

The endpoint modifies the weekend meal application period (start/end dates), which is a system-level setting for administrators. The service code at line 18 calls adminFacadeUseCase.currentAdmin(), confirming it expects an admin user. Granting ROLE_STU access violates authorization requirements and will cause runtime failures when students attempt to access it. This endpoint should remain restricted to ROLE_SCH only.

🤖 Prompt for AI Agents
In src/main/kotlin/dsm/pick2024/global/config/security/SecurityConfig.kt around
lines 129-130, remove the "/weekend-meal/period" entry from the PATCH
permissions granted to ROLE_STU so that students no longer have access; ensure
the path remains only in the admin/ROLE_SCH-only rules (or the admin antMatcher)
so that only administrators can PATCH this endpoint, and adjust the
corresponding authorizeRequests/antMatchers block accordingly.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

주말 급식 공지 문제 해결

2 participants