From 972f10fcf00ee9144b65f158b1d0b54b413751dc Mon Sep 17 00:00:00 2001 From: yoondgu Date: Mon, 2 Oct 2023 17:07:52 +0900 Subject: [PATCH 1/6] =?UTF-8?q?fix:=20AuthMember=20=EB=B0=9B=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20LoginRequired=20=ED=95=B8=EB=93=A4?= =?UTF-8?q?=EB=9F=AC=20=EB=A9=94=EC=84=9C=EB=93=9C=EB=8F=84=20=EA=B2=80?= =?UTF-8?q?=EC=A6=9D=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapbefine/common/interceptor/AuthInterceptor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/com/mapbefine/mapbefine/common/interceptor/AuthInterceptor.java b/backend/src/main/java/com/mapbefine/mapbefine/common/interceptor/AuthInterceptor.java index 7ee91245..46e01ba2 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/common/interceptor/AuthInterceptor.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/common/interceptor/AuthInterceptor.java @@ -40,7 +40,7 @@ public boolean preHandle( if (!(handler instanceof HandlerMethod handlerMethod)) { return true; } - if (isAuthMemberNotRequired(handlerMethod)) { + if (isAuthMemberNotRequired(handlerMethod) && isLoginNotRequired(handlerMethod)) { return true; } @@ -60,6 +60,10 @@ private boolean isAuthMemberNotRequired(HandlerMethod handlerMethod) { .noneMatch(parameter -> parameter.getParameterType().equals(AuthMember.class)); } + private boolean isLoginNotRequired(HandlerMethod handlerMethod) { + return !isLoginRequired(handlerMethod); + } + private boolean isLoginRequired(HandlerMethod handlerMethod) { LoginRequired loginRequired = handlerMethod.getMethodAnnotation(LoginRequired.class); From 40fb309c686b4e312c52d2d8b1698467aff0588c Mon Sep 17 00:00:00 2001 From: yoondgu Date: Mon, 2 Oct 2023 17:13:14 +0900 Subject: [PATCH 2/6] =?UTF-8?q?refactor:=20(=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EC=99=B8=20API)=20=ED=9A=8C=EC=9B=90=20=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=8B=9C=20=EC=9D=B4=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=EB=B0=98=ED=99=98=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapbefine/member/dto/response/MemberResponse.java | 8 +++----- .../mapbefine/member/domain/MemberResponseTest.java | 2 -- .../member/presentation/MemberControllerTest.java | 6 ++---- .../permission/presentation/PermissionControllerTest.java | 4 ++-- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/backend/src/main/java/com/mapbefine/mapbefine/member/dto/response/MemberResponse.java b/backend/src/main/java/com/mapbefine/mapbefine/member/dto/response/MemberResponse.java index 394ee43c..7ce35b2a 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/member/dto/response/MemberResponse.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/member/dto/response/MemberResponse.java @@ -3,10 +3,9 @@ import com.mapbefine.mapbefine.member.domain.Member; import com.mapbefine.mapbefine.member.domain.MemberInfo; -public record MemberResponse ( +public record MemberResponse( Long id, - String nickName, - String email + String nickName ) { public static MemberResponse from(Member member) { @@ -14,8 +13,7 @@ public static MemberResponse from(Member member) { return new MemberResponse( member.getId(), - memberInfo.getNickName(), - memberInfo.getEmail() + memberInfo.getNickName() ); } diff --git a/backend/src/test/java/com/mapbefine/mapbefine/member/domain/MemberResponseTest.java b/backend/src/test/java/com/mapbefine/mapbefine/member/domain/MemberResponseTest.java index 1af18864..b5b0cc74 100644 --- a/backend/src/test/java/com/mapbefine/mapbefine/member/domain/MemberResponseTest.java +++ b/backend/src/test/java/com/mapbefine/mapbefine/member/domain/MemberResponseTest.java @@ -25,8 +25,6 @@ void createMemberResponse_success() { // then assertThat(memberResponse.nickName()) .isEqualTo(member.getMemberInfo().getNickName()); - assertThat(memberResponse.email()) - .isEqualTo(member.getMemberInfo().getEmail()); } } diff --git a/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java b/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java index df12531d..f4942539 100644 --- a/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java +++ b/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java @@ -31,13 +31,11 @@ void findAllMember() throws Exception { List memberResponses = List.of( new MemberResponse( 1L, - "member1", - "member1@member.com" + "member1" ), new MemberResponse( 2L, - "member2", - "member2@member.com" + "member2" ) ); diff --git a/backend/src/test/java/com/mapbefine/mapbefine/permission/presentation/PermissionControllerTest.java b/backend/src/test/java/com/mapbefine/mapbefine/permission/presentation/PermissionControllerTest.java index e2311f47..d06d2b33 100644 --- a/backend/src/test/java/com/mapbefine/mapbefine/permission/presentation/PermissionControllerTest.java +++ b/backend/src/test/java/com/mapbefine/mapbefine/permission/presentation/PermissionControllerTest.java @@ -52,8 +52,8 @@ void deletePermission() throws Exception { @DisplayName("특정 토픽 접근 정보 조회(권한 회원 목록, 공개 여부)") void findTopicAccessDetailByTopicId() throws Exception { List permissionedMembers = List.of( - new PermissionedMemberResponse(1L, new MemberResponse(1L, "member", "member@naver.com")), - new PermissionedMemberResponse(1L, new MemberResponse(2L, "memberr", "memberr@naver.com")) + new PermissionedMemberResponse(1L, new MemberResponse(1L, "member")), + new PermissionedMemberResponse(1L, new MemberResponse(2L, "memberr")) ); TopicAccessDetailResponse response = new TopicAccessDetailResponse(Publicity.PUBLIC, permissionedMembers); From 064934fc0473c94cf10c2ef70fe8d08cc5d142ce Mon Sep 17 00:00:00 2001 From: yoondgu Date: Mon, 2 Oct 2023 17:15:22 +0900 Subject: [PATCH 3/6] =?UTF-8?q?refactor:=20(=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EC=99=B8=20API)=20=ED=9A=8C=EC=9B=90=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=8B=9C=20=ED=83=88=ED=87=B4,=20=EC=B0=A8=EB=8B=A8=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=20=EC=A0=9C=EC=99=B8=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapbefine/member/application/MemberQueryService.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java b/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java index 6e0df34f..c15549cb 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java @@ -14,11 +14,10 @@ import com.mapbefine.mapbefine.topic.domain.Topic; import com.mapbefine.mapbefine.topic.domain.TopicRepository; import com.mapbefine.mapbefine.topic.dto.response.TopicResponse; +import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.List; - @Service @Transactional(readOnly = true) public class MemberQueryService { @@ -49,13 +48,14 @@ public MemberDetailResponse findById(Long id) { private Member findMemberById(Long id) { return memberRepository.findById(id) + .filter(Member::isNormalStatus) .orElseThrow(() -> new MemberNotFoundException(MemberErrorCode.MEMBER_NOT_FOUND, id)); } - // TODO: 2023/09/13 차단된 or 탈퇴한 사용자 필터링 필요 public List findAll() { return memberRepository.findAll() .stream() + .filter(Member::isNormalStatus) .map(MemberResponse::from) .toList(); } @@ -63,7 +63,8 @@ public List findAll() { public List findAllTopicsInBookmark(AuthMember authMember) { Member member = findMemberById(authMember.getMemberId()); - List bookMarkedTopics = topicRepository.findTopicsByBookmarksMemberIdAndIsDeletedFalse(authMember.getMemberId()); + List bookMarkedTopics = topicRepository.findTopicsByBookmarksMemberIdAndIsDeletedFalse( + authMember.getMemberId()); return bookMarkedTopics.stream() .map(topic -> TopicResponse.from( topic, From 41bd6a6ce81c7dd6e779a3d0c9b395b67026830e Mon Sep 17 00:00:00 2001 From: yoondgu Date: Mon, 2 Oct 2023 17:37:06 +0900 Subject: [PATCH 4/6] =?UTF-8?q?refactor:=20(=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EC=99=B8=20API)=20=ED=9A=8C=EC=9B=90=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EC=8B=9C=20=EC=9E=90=EA=B8=B0=20=EC=9E=90?= =?UTF-8?q?=EC=8B=A0=EB=A7=8C=20=EC=A1=B0=ED=9A=8C=20=EA=B0=80=EB=8A=A5?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 현재 사용자가 다른 회원의 상세 정보를 확인해야 하는 일이 없음 - 추후 해당 API /members/{memberId}를 /members/my/profile 로 변경 예정 --- .../mapbefine/auth/domain/AuthMember.java | 10 ++++--- .../application/MemberQueryService.java | 11 ++++--- .../member/exception/MemberErrorCode.java | 1 + .../member/presentation/MemberController.java | 4 +-- .../application/MemberQueryServiceTest.java | 30 +++++++++++-------- .../presentation/MemberControllerTest.java | 2 +- 6 files changed, 34 insertions(+), 24 deletions(-) diff --git a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/AuthMember.java b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/AuthMember.java index d27f7cc2..3bfc0767 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/AuthMember.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/AuthMember.java @@ -1,8 +1,8 @@ package com.mapbefine.mapbefine.auth.domain; -import com.mapbefine.mapbefine.member.domain.Role; import com.mapbefine.mapbefine.topic.domain.Topic; import java.util.List; +import java.util.Objects; public abstract class AuthMember { @@ -27,11 +27,13 @@ protected AuthMember( public abstract boolean canTopicUpdate(Topic topic); public abstract boolean canPinCreateOrUpdate(Topic topic); - - public abstract boolean isRole(Role role); - + public Long getMemberId() { return memberId; } + public boolean isSameMember(Long memberId) { + return Objects.equals(memberId, this.memberId); + } + } diff --git a/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java b/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java index c15549cb..76c3af98 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/member/application/MemberQueryService.java @@ -9,6 +9,7 @@ import com.mapbefine.mapbefine.member.dto.response.MemberDetailResponse; import com.mapbefine.mapbefine.member.dto.response.MemberResponse; import com.mapbefine.mapbefine.member.exception.MemberErrorCode; +import com.mapbefine.mapbefine.member.exception.MemberException.MemberForbiddenException; import com.mapbefine.mapbefine.member.exception.MemberException.MemberNotFoundException; import com.mapbefine.mapbefine.pin.dto.response.PinResponse; import com.mapbefine.mapbefine.topic.domain.Topic; @@ -40,10 +41,12 @@ public MemberQueryService( this.topicRepository = topicRepository; } - public MemberDetailResponse findById(Long id) { - Member member = findMemberById(id); - - return MemberDetailResponse.from(member); + public MemberDetailResponse findById(AuthMember authMember, Long id) { + if (authMember.isSameMember(id)) { + Member member = findMemberById(id); + return MemberDetailResponse.from(member); + } + throw new MemberForbiddenException(MemberErrorCode.FORBIDDEN_ACCESS, id); } private Member findMemberById(Long id) { diff --git a/backend/src/main/java/com/mapbefine/mapbefine/member/exception/MemberErrorCode.java b/backend/src/main/java/com/mapbefine/mapbefine/member/exception/MemberErrorCode.java index 98c42af4..1b22edea 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/member/exception/MemberErrorCode.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/member/exception/MemberErrorCode.java @@ -10,6 +10,7 @@ public enum MemberErrorCode { ILLEGAL_EMAIL_NULL("05002", "이메일은 필수로 입력해야합니다."), ILLEGAL_EMAIL_PATTERN("05003", "올바르지 않은 이메일 형식입니다."), FORBIDDEN_MEMBER_STATUS("05100", "탈퇴 혹은 차단된 회원입니다."), + FORBIDDEN_ACCESS("05101", "해당 회원 정보에 대한 접근 권한이 없습니다."), MEMBER_NOT_FOUND("05400", "존재하지 않는 회원입니다."), ILLEGAL_NICKNAME_ALREADY_EXISTS("05900", "이미 존재하는 닉네임입니다."), ; diff --git a/backend/src/main/java/com/mapbefine/mapbefine/member/presentation/MemberController.java b/backend/src/main/java/com/mapbefine/mapbefine/member/presentation/MemberController.java index a9e63c5e..46d6c712 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/member/presentation/MemberController.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/member/presentation/MemberController.java @@ -40,8 +40,8 @@ public ResponseEntity> findAllMember() { @LoginRequired @GetMapping("/{memberId}") - public ResponseEntity findMemberById(@PathVariable Long memberId) { - MemberDetailResponse response = memberQueryService.findById(memberId); + public ResponseEntity findMemberById(AuthMember authMember, @PathVariable Long memberId) { + MemberDetailResponse response = memberQueryService.findById(authMember, memberId); return ResponseEntity.ok(response); } diff --git a/backend/src/test/java/com/mapbefine/mapbefine/member/application/MemberQueryServiceTest.java b/backend/src/test/java/com/mapbefine/mapbefine/member/application/MemberQueryServiceTest.java index 2e0d8a4c..1165eaf0 100644 --- a/backend/src/test/java/com/mapbefine/mapbefine/member/application/MemberQueryServiceTest.java +++ b/backend/src/test/java/com/mapbefine/mapbefine/member/application/MemberQueryServiceTest.java @@ -1,5 +1,6 @@ package com.mapbefine.mapbefine.member.application; +import static com.mapbefine.mapbefine.member.domain.Role.USER; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -19,7 +20,7 @@ import com.mapbefine.mapbefine.member.domain.Role; import com.mapbefine.mapbefine.member.dto.response.MemberDetailResponse; import com.mapbefine.mapbefine.member.dto.response.MemberResponse; -import com.mapbefine.mapbefine.member.exception.MemberException.MemberNotFoundException; +import com.mapbefine.mapbefine.member.exception.MemberException.MemberForbiddenException; import com.mapbefine.mapbefine.pin.PinFixture; import com.mapbefine.mapbefine.pin.domain.Pin; import com.mapbefine.mapbefine.pin.domain.PinRepository; @@ -81,10 +82,10 @@ private void createTopics(Member member) { void findAllMember() { // given Member member2 = memberRepository.save( - MemberFixture.create("member2", "member2@member.com", Role.USER) + MemberFixture.create("member2", "member2@member.com", USER) ); Member member3 = memberRepository.save( - MemberFixture.create("member3", "member3@member.com", Role.USER) + MemberFixture.create("member3", "member3@member.com", USER) ); // when @@ -103,12 +104,8 @@ void findAllMember() { @DisplayName("회원을 단일 조회한다.") void findMemberById() { // given - Member member = memberRepository.save( - MemberFixture.create("member", "member@naver.com", Role.USER) - ); - // when - MemberDetailResponse response = memberQueryService.findById(member.getId()); + MemberDetailResponse response = memberQueryService.findById(authMember, member.getId()); // then assertThat(response).usingRecursiveComparison() @@ -116,13 +113,20 @@ void findMemberById() { } @Test - @DisplayName("조회하려는 회원이 없는 경우 예외를 반환한다.") + @DisplayName("조회하려는 회원이 없는 경우 본인이 아니므로 예외를 반환한다.") void findMemberById_whenNoneExists_thenFail() { // given when then - assertThatThrownBy(() -> memberQueryService.findById(Long.MAX_VALUE)) - .isInstanceOf(MemberNotFoundException.class); + assertThatThrownBy(() -> memberQueryService.findById(authMember, Long.MAX_VALUE)) + .isInstanceOf(MemberForbiddenException.class); } + @Test + @DisplayName("조회하려는 회원이 본인이 아닌 경우 예외를 반환한다.") + void findMemberById_whenNotSameMember_thenFail() { + // given when then + assertThatThrownBy(() -> memberQueryService.findById(authMember, Long.MAX_VALUE)) + .isInstanceOf(MemberForbiddenException.class); + } @Test @DisplayName("즐겨찾기 목록에 추가 된 토픽을 조회할 수 있다") @@ -158,7 +162,7 @@ void findAtlasByMember_Success() { } @Test - @DisplayName("") + @DisplayName("로그인한 회원의 모든 지도를 가져올 수 있다.") void findMyAllTopics_Success() { //when List myAllTopics = memberQueryService.findMyAllTopics(authMember); @@ -198,5 +202,5 @@ void findMyAllPins_Success() { .isEqualTo(pinIds); } - + } diff --git a/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java b/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java index f4942539..c3a89587 100644 --- a/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java +++ b/backend/src/test/java/com/mapbefine/mapbefine/member/presentation/MemberControllerTest.java @@ -58,7 +58,7 @@ void findMemberById() throws Exception { LocalDateTime.now() ); - given(memberQueryService.findById(any())).willReturn(memberDetailResponse); + given(memberQueryService.findById(any(), any())).willReturn(memberDetailResponse); mockMvc.perform( MockMvcRequestBuilders.get("/members/1") From 9bbde0b6dba69cf0c781373702cda355bfd2433e Mon Sep 17 00:00:00 2001 From: yoondgu Date: Mon, 2 Oct 2023 17:44:45 +0900 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20AuthMember=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=A9=94=EC=84=9C?= =?UTF-8?q?=EB=93=9C=20=EC=98=A4=EB=B2=84=EB=9D=BC=EC=9D=B4=EB=94=A9=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - isRole 메서드를 사용하지 않음 --- .../com/mapbefine/mapbefine/auth/domain/member/Admin.java | 6 ------ .../com/mapbefine/mapbefine/auth/domain/member/Guest.java | 5 ----- .../com/mapbefine/mapbefine/auth/domain/member/User.java | 6 ------ 3 files changed, 17 deletions(-) diff --git a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Admin.java b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Admin.java index f6a54648..3d97522c 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Admin.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Admin.java @@ -1,7 +1,6 @@ package com.mapbefine.mapbefine.auth.domain.member; import com.mapbefine.mapbefine.auth.domain.AuthMember; -import com.mapbefine.mapbefine.member.domain.Role; import com.mapbefine.mapbefine.topic.domain.Topic; import java.util.Collections; @@ -35,9 +34,4 @@ public boolean canPinCreateOrUpdate(Topic topic) { return true; } - @Override - public boolean isRole(Role role) { - return Role.ADMIN == role; - } - } diff --git a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Guest.java b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Guest.java index dcd8dbeb..6c8c0edc 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Guest.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/Guest.java @@ -1,7 +1,6 @@ package com.mapbefine.mapbefine.auth.domain.member; import com.mapbefine.mapbefine.auth.domain.AuthMember; -import com.mapbefine.mapbefine.member.domain.Role; import com.mapbefine.mapbefine.topic.domain.Topic; import com.mapbefine.mapbefine.topic.domain.TopicStatus; import java.util.Collections; @@ -37,8 +36,4 @@ public boolean canPinCreateOrUpdate(Topic topic) { return false; } - @Override - public boolean isRole(Role role) { - return Role.GUEST == role; - } } diff --git a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/User.java b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/User.java index ed2ea7b8..d2444d49 100644 --- a/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/User.java +++ b/backend/src/main/java/com/mapbefine/mapbefine/auth/domain/member/User.java @@ -1,7 +1,6 @@ package com.mapbefine.mapbefine.auth.domain.member; import com.mapbefine.mapbefine.auth.domain.AuthMember; -import com.mapbefine.mapbefine.member.domain.Role; import com.mapbefine.mapbefine.topic.domain.Topic; import com.mapbefine.mapbefine.topic.domain.TopicStatus; import java.util.List; @@ -55,9 +54,4 @@ private boolean hasPermission(Long topicId) { return createdTopic.contains(topicId) || topicsWithPermission.contains(topicId); } - @Override - public boolean isRole(Role role) { - return Role.USER == role; - } - } From 9fbaefd9f098f9f4b8a94178da6fa093dc42e184 Mon Sep 17 00:00:00 2001 From: yoondgu Date: Mon, 2 Oct 2023 17:47:46 +0900 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20SQL=EC=97=90=20=EC=98=A4=ED=83=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/data-default.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/resources/data-default.sql b/backend/src/main/resources/data-default.sql index 8d6887eb..1ef6fe67 100644 --- a/backend/src/main/resources/data-default.sql +++ b/backend/src/main/resources/data-default.sql @@ -5,7 +5,7 @@ VALUES ('dummyMember', 'dummy@gmail.com', 'https://map-befine-official.github.io 1L, 'KAKAO', now(), now()); -INSERT INTO topic (name, image_url, description,가 +INSERT INTO topic (name, image_url, description, permission_type, publicity, member_id, created_at, updated_at, last_pin_updated_at)