Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#520 [feat] 인가체제 변경 #523

Closed
wants to merge 5 commits into from
Closed

#520 [feat] 인가체제 변경 #523

wants to merge 5 commits into from

Conversation

parkheeddong
Copy link
Contributor

@parkheeddong parkheeddong commented Oct 6, 2024

✒️ 관련 이슈번호

Key Changes 🔑

아래 API 들에 대하여 수정했습니다!

  1. 관리자페이지 글감 수정
    @UserAuthAnnotation(UserAuthenticationType.OWNER) 적용
    userId 파라미터 제거 및 권한체크 로직 제거

  2. 관리자페이지 멤버 삭제
    @UserAuthAnnotation(UserAuthenticationType.OWNER) 적용
    userId 파라미터 제거 및 권한체크 로직 제거

  3. 관리자페이지 모임 삭제
    @UserAuthAnnotation(UserAuthenticationType.OWNER) 적용
    userId 파라미터 제거 및 권한체크 로직 제거

  4. 글감 삭제
    @UserAuthAnnotation(UserAuthenticationType.OWNER) 적용
    userId 파라미터 제거 및 권한체크 로직 제거

  5. 글 삭제
    @UserAuthAnnotation(UserAuthenticationType.WRITER_NAME) 적용
    userId파라미터 제거 및 권한체크 로직 변경

혹시 수정할 부분이 있다면 말씀 부탁드립니다!!

Copy link
Member

@sohyundoh sohyundoh left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 리뷰 확인해주세요!

Comment on lines 52 to 60
@Override
@DeleteMapping("/{topicId}")
@UserAuthAnnotation(UserAuthenticationType.OWNER)
public ResponseEntity<SuccessResponse> deleteTopic(
@TopicIdPathVariable final Long topicId,
@UserId final Long userId,
@PathVariable("topicId") final String topicUrl
) {
topicService.deleteTopic(userId, topicId);
topicService.deleteTopic(topicId);
return ResponseEntity.ok(SuccessResponse.of(SuccessMessage.TOPIC_DELETE_SUCCESS));
Copy link
Member

Choose a reason for hiding this comment

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

P2
{topicId}로 요청이 들어올 경우 moimId기반으로 owner인지 확인하는 로직에서 에러가 날 것 같은데 아닌가요!?

return ResponseEntity.ok(SuccessResponse.of(SuccessMessage.TOPIC_DELETE_SUCCESS));
}

@PutMapping("/{topicId}")
@UserAuthAnnotation(UserAuthenticationType.OWNER)
public ResponseEntity<SuccessResponse> putTopic(
Copy link
Member

Choose a reason for hiding this comment

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

P2
위 리뷰와 동일한 내용입니다!

Comment on lines +31 to 36
@UserAuthAnnotation(UserAuthenticationType.OWNER)
public ResponseEntity<SuccessResponse> deleteMember(
@PathVariable("writerNameId") final Long writerNameId,
@UserId final Long userId
@PathVariable("writerNameId") final Long writerNameId
) {
writerNameService.deleteWriterNameById(writerNameId, userId);
writerNameService.deleteWriterNameById(writerNameId);
return ResponseEntity.ok(SuccessResponse.of(SuccessMessage.MOIM_MEMBER_DELETE_SUCCESS));
Copy link
Member

Choose a reason for hiding this comment

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

P2
위 리뷰와 동일한 내용입니다!

@parkheeddong
Copy link
Contributor Author

말씀해주신 부분이 맞네요🥲 일단 풀리퀘 닫고 다시 올리겠습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[feat] 인가체제 변경
2 participants