-
Notifications
You must be signed in to change notification settings - Fork 1
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
Closed
#520 [feat] 인가체제 변경 #523
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0ea0caf
#520 [feat] 관리자페이지 글감 수정 인가체제 변경
parkheeddong 8f65437
#520 [feat] 관리자페이지 멤버 삭제 인가체제 변경
parkheeddong 76def44
#520 [feat] 관리자페이지 모임 삭제 인가체제 변경
parkheeddong 37aa76a
#520 [feat] 글감 삭제 인가체제 변경
parkheeddong 5d770d1
#520 [feat] 글 삭제 인가체제 변경
parkheeddong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package com.mile.controller.topic; | ||
|
||
import com.mile.common.auth.annotation.UserAuthAnnotation; | ||
import com.mile.common.auth.annotation.UserAuthenticationType; | ||
import com.mile.common.resolver.user.UserId; | ||
import com.mile.dto.SuccessResponse; | ||
import com.mile.exception.message.SuccessMessage; | ||
|
@@ -49,23 +51,24 @@ public ResponseEntity<SuccessResponse<TopicDetailResponse>> getTopicDetail( | |
|
||
@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)); | ||
} | ||
|
||
@PutMapping("/{topicId}") | ||
@UserAuthAnnotation(UserAuthenticationType.OWNER) | ||
public ResponseEntity<SuccessResponse> putTopic( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2 |
||
@RequestBody @Valid final TopicPutRequest topicPutRequest, | ||
@TopicIdPathVariable final Long topicId, | ||
@UserId final Long userId, | ||
@PathVariable("topicId") final String topicUrl | ||
) { | ||
topicService.putTopic(userId, topicId, topicPutRequest); | ||
topicService.putTopic(topicId, topicPutRequest); | ||
return ResponseEntity.ok(SuccessResponse.of(SuccessMessage.TOPIC_PUT_SUCCESS)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package com.mile.controller.writername; | ||
|
||
import com.mile.common.auth.annotation.UserAuthAnnotation; | ||
import com.mile.common.auth.annotation.UserAuthenticationType; | ||
import com.mile.common.resolver.user.UserId; | ||
import com.mile.dto.SuccessResponse; | ||
import com.mile.exception.message.SuccessMessage; | ||
|
@@ -26,11 +28,11 @@ public class WriterNameController implements WriterNameControllerSwagger { | |
|
||
@Override | ||
@DeleteMapping("/{writerNameId}") | ||
@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)); | ||
Comment on lines
+31
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2 |
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2
{topicId}로 요청이 들어올 경우 moimId기반으로 owner인지 확인하는 로직에서 에러가 날 것 같은데 아닌가요!?