-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/#33 조직 조회 API 추가 #40
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
Changes from all commits
58c482f
67fc0c1
ede17d3
d4bb469
a365d32
1f666db
befe198
4e2ddd9
f28a530
54b0483
23a87a3
2005842
f031b8e
752821a
9e67466
d8e9c40
63db05c
731cfdc
99b20cb
f7ec6a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -18,7 +18,11 @@ public enum OrgErrorCode implements BaseErrorCode { | |||||||||
| ORG_NOT_FOUND(HttpStatus.NOT_FOUND, "ORG_404_1", "해당 id 의 조직이 존재하지 않습니다."), | ||||||||||
|
|
||||||||||
| //409 | ||||||||||
| ORG_ALREADY_ACTIVE(HttpStatus.CONFLICT, "ORG_409_1", "해당 조직은 이미 활성화 상태 입니다.") | ||||||||||
| ORG_ALREADY_ACTIVE(HttpStatus.CONFLICT, "ORG_409_1", "해당 조직은 이미 활성화 상태 입니다."), | ||||||||||
|
|
||||||||||
|
|
||||||||||
| //410 | ||||||||||
| ORG_SOFT_DELETED(HttpStatus.GONE, "ORG_410_1", "해당 조직은 삭제된 조직입니다.(Soft Delete)"), | ||||||||||
|
Comment on lines
+24
to
+25
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. 410 Gone 사용은 의미론적으로 정확합니다! 👍 메시지 문자열에 공백 하나가 빠졌습니다. 소프트 딜리트된 리소스에 ✏️ 메시지 수정 제안-ORG_SOFT_DELETED(HttpStatus.GONE, "ORG_410_1", "해당 조직은 삭제된 조직입니다.(Soft Delete)"),
+ORG_SOFT_DELETED(HttpStatus.GONE, "ORG_410_1", "해당 조직은 삭제된 조직입니다. (Soft Delete)"),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| ; | ||||||||||
| private final HttpStatus httpStatus; | ||||||||||
| private final String code; | ||||||||||
|
|
||||||||||
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.
조직 비공개 여부에 따라 멤버십 접근 제어 검토 필요
현재 구현은 삭제된 조직 여부(소프트 딜리트)만 확인하고, 요청한 사용자가 해당 조직의 멤버인지는 검증하지 않습니다. 즉, 인증된 사용자라면 조직
id만 알면 본인이 속하지 않은 조직의 상세 정보도 조회할 수 있습니다.비공개 조직이나 B2B 테넌트 격리가 요구사항에 있다면 아래와 같은 멤버십 검증 로직을 추가하는 것을 권장합니다:
요구사항상 조직 상세 정보가 인증된 사용자 누구에게나 공개되는 것이라면 현재 구현도 문제없습니다. 의도된 설계인지 확인 부탁드립니다.
🤖 Prompt for AI Agents
🧩 Analysis chain
🏁 Script executed:
Repository: WhereYouAd/WhereYouAd-Backend
Length of output: 470
🏁 Script executed:
Repository: WhereYouAd/WhereYouAd-Backend
Length of output: 7754
🏁 Script executed:
Repository: WhereYouAd/WhereYouAd-Backend
Length of output: 945
순수 조회 메서드에
@Transactional(readOnly = true)추가 필요이 메서드는 Organization을 조회하고 상태를 확인한 후 DTO로 변환하는 순수 읽기 작업입니다. 현재는 클래스 레벨의
@Transactional(기본값:readOnly = false)에서 실행되고 있는데, 이는 쓰기 작업을 위한 설정입니다.readOnly = true를 추가하면:
♻️ 개선 제안
+ `@Transactional`(readOnly = true) public OrgResponse.OrgDetail getOrganizationDetail(Long orgId) {현재 코드는 OrgService 인터페이스에 메서드가 잘 선언되어 있고(12번 줄), OrgController도 인터페이스 타입으로 주입받기 때문에 정상 작동합니다. 좋은 DI 패턴이네요. 👍
🤖 Prompt for AI Agents