-
Notifications
You must be signed in to change notification settings - Fork 0
feat(Store): 관리자 접근 제한 #66
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
Merged
The head ref may contain hidden characters: "feature/#62-\uAD00\uB9AC\uC790store\uC811\uADFC\uC81C\uD55C"
Merged
Changes from all commits
Commits
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
9 changes: 9 additions & 0 deletions
9
.../main/java/com/nowait/domaincorerdb/store/exception/StoreDeleteUnauthorizedException.java
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.nowait.domaincorerdb.store.exception; | ||
|
|
||
| import com.nowait.common.exception.ErrorMessage; | ||
|
|
||
| public class StoreDeleteUnauthorizedException extends RuntimeException { | ||
| public StoreDeleteUnauthorizedException() { | ||
| super(ErrorMessage.STORE_DELETE_UNAUTHORIZED.getMessage()); | ||
| } | ||
| } |
9 changes: 9 additions & 0 deletions
9
.../main/java/com/nowait/domaincorerdb/store/exception/StoreUpdateUnauthorizedException.java
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.nowait.domaincorerdb.store.exception; | ||
|
|
||
| import com.nowait.common.exception.ErrorMessage; | ||
|
|
||
| public class StoreUpdateUnauthorizedException extends RuntimeException { | ||
| public StoreUpdateUnauthorizedException() { | ||
| super(ErrorMessage.STORE_UPDATE_UNAUTHORIZED.getMessage()); | ||
| } | ||
| } |
9 changes: 9 additions & 0 deletions
9
...rc/main/java/com/nowait/domaincorerdb/store/exception/StoreViewUnauthorizedException.java
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.nowait.domaincorerdb.store.exception; | ||
|
|
||
| import com.nowait.common.exception.ErrorMessage; | ||
|
|
||
| public class StoreViewUnauthorizedException extends RuntimeException { | ||
| public StoreViewUnauthorizedException() { | ||
| super(ErrorMessage.STORE_VIEW_UNAUTHORIZED.getMessage()); | ||
| } | ||
| } |
This file contains hidden or 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
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.
💡 Verification agent
🧩 Analysis chain
사용자의 storeId가 null인 경우 처리 확인 필요
권한 검증 로직에서
user.getStoreId()가 null일 수 있는 경우를 고려해야 합니다. 매니저 회원가입 시 storeId를 수동으로 추가하는 프로세스 변경으로 인해 storeId가 null인 사용자가 존재할 수 있습니다.다음 스크립트를 실행하여 User 엔티티의 storeId 필드가 nullable인지 확인하세요:
Also applies to: 75-76, 104-105
🏁 Script executed:
Length of output: 2939
storeId가 null일 때 NPE 방지 로직 추가 필요
권한 검증 시
user.getStoreId()가null일 수 있어 현재equals호출 시 NPE가 발생할 수 있습니다. 아래 위치들에 대해 null-safe 비교 로직으로 변경해주세요.• 라인 56–57
• 라인 75–76
• 라인 104–105
수정 예시 1:
Objects.equals사용수정 예시 2: 명시적 null 체크
이렇게 변경하면
storeId가null일 때도 안전하게 권한 검증이 수행됩니다.📝 Committable suggestion
🤖 Prompt for AI Agents