Skip to content

feat: 대회 내 질문 커뮤니티 추가 및 권한/버그 수정 - #753

Open
taekoong wants to merge 11 commits into
developfrom
contest-community
Open

feat: 대회 내 질문 커뮤니티 추가 및 권한/버그 수정#753
taekoong wants to merge 11 commits into
developfrom
contest-community

Conversation

@taekoong

Copy link
Copy Markdown
Contributor

Changelog

  • [버그 수정] 댓글 조회/작성/수정/삭제 API에 대회 접근 권한 및 게시글 공개범위(CONTEST_HOSTS) 체크가 빠져 있던 문제 수정
    • 게시글 상세 조회에서만 체크하던 "주최자 전용 글" 권한을 can_view_post()로 통합해 댓글 API에도 동일하게 적용
    • 권한 없는 사용자가 주최자 전용 게시글의 댓글을 조회/작성할 수 있던 구멍을 막음
  • [버그 수정] check_contest_permission이 이미 preload된 self.contest를 재사용하던 경로 제거
    → 항상 visible=True 조건으로 재조회하도록 변경 (soft-delete/비공개 처리된 대회를 우회 접근하는 경로 차단)
  • [버그 수정] 대회 커뮤니티 "내 질문" 탭이 클라이언트 사이드에서 현재 페이지 결과만 필터링하던 버그 수정
    → 서버에 is_mine 파라미터를 보내 서버 사이드에서 필터링하도록 변경 (페이지네이션과 무관하게 정확한 결과 반환)
  • [버그 수정] ContestHistory.vue에서 isAuthenticated가 Vuex mapGetters로 매핑되지 않아 항상 undefined였던 문제 수정

Testing

develop 머지 후 충돌 4개 파일(account/decorators.py, community/tests.py, community/views/oj.py, ContestCommunity.vue) 모두 본 브랜치 버전으로 해결, Python 문법 체크(py_compile) 통과 확인

Ops Impact

N/A

Version Compatibility

N/A

@taekoong
taekoong requested review from Neibce and wlsgur11 August 10, 2026 10:30
@taekoong taekoong self-assigned this Aug 10, 2026
@taekoong taekoong added frontend-client 프론트엔드(클라이언트) 페이지와 관련된 일에 지정합니다. backend 일반적인 백엔드에서 처리해야 하는 일에 지정합니다. labels Aug 10, 2026
@Neibce
Neibce requested a balanced review from Copilot August 10, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Neibce

Neibce commented Aug 10, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 53a7f0a750

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +116 to +118
try:
# Always reload with visible=True so preloaded contests cannot bypass soft-delete visibility.
self.contest = Contest.objects.select_related("created_by").get(id=contest_id, visible=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Validate the preloaded contest instead of a request override

When an endpoint has already derived self.contest from a post or comment, this reload still uses a caller-supplied contest_id from the request first. A user can therefore request a participant-visible post in a password-protected or otherwise inaccessible contest while supplying the ID of a contest they can access; the decorator validates the unrelated contest, and can_view_post then permits the actual post. Re-query the preloaded contest with visible=True, or reject a supplied ID that does not match it.

Useful? React with 👍 / 👎.

@wlsgur11 wlsgur11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. 숨긴 대회 글 훔쳐보기가 가능한가요?
  • 글 볼 때 대회 보는 권한을 얻을 때 주소에 적힌 대회 번호로 확인하는지, 그 글이 실제로 속한 대회로 확인하는지 궁금합니다. 전자라면 내가 볼 수 있는 대회 번호를 넣고 숨긴 대회 글 번호 요청하면 뚫릴 것 같아욥
  1. 대회 번호 자리에 텍스트 넣으면 500예상
  • 예외처리 부탁쓰 ㅋ

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

Labels

backend 일반적인 백엔드에서 처리해야 하는 일에 지정합니다. frontend-client 프론트엔드(클라이언트) 페이지와 관련된 일에 지정합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants