-
Notifications
You must be signed in to change notification settings - Fork 0
Test: User 테스트 코드 / PreAuthorize 작성 #129
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
Open
kimzini
wants to merge
19
commits into
develop
Choose a base branch
from
BACKEND-189
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
47e3816
build: 테스트 코드 의존성 추가
kimzini 38c0003
feat: User 권한 검증
kimzini 8541785
feat: 테스트 컨테이너 설정
kimzini 9287b3b
test: Role 테스트 코드 작성
kimzini a6dff81
test: User 테스트 코드 작성
kimzini 9beeefc
style: spotlessApply 적용
kimzini 13bdade
Merge branch 'develop' into BACKEND-189
kimzini bc87c2a
feat: 중복 메서드 제거
kimzini 965a7bb
feat: 중복 코드 제거
kimzini 35eec81
style: spotlessApply 적용
kimzini c66f1c7
feat: targetUser 중복조회 제거
kimzini c3c3828
feat: 테스트 컨테이너 설정 변경
kimzini fa563ce
Merge branch 'develop' into BACKEND-189
kimzini 4b01e35
fix: roldId 지정
kimzini 744aefa
fix: bootcampService import 추가
kimzini 9d64154
feat: 권한 검증 실패 테스트 구현
kimzini 3717206
fix: github url 검증
kimzini c9d11ac
fix: CI 오류 해결
kimzini d261a43
fix:github test 제거
kimzini 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
22 changes: 16 additions & 6 deletions
22
techeerzip/src/main/java/backend/techeerzip/domain/role/entity/RoleType.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 |
|---|---|---|
| @@ -1,19 +1,29 @@ | ||
| package backend.techeerzip.domain.role.entity; | ||
|
|
||
| public enum RoleType { | ||
| ADMIN("ROLE_ADMIN"), | ||
| MENTOR("ROLE_MENTOR"), | ||
| TECHEER("ROLE_TECHEER"), | ||
| COMPANY("ROLE_COMPANY"), | ||
| BOOTCAMP("ROLE_BOOTCAMP"); | ||
| ADMIN("ROLE_ADMIN", 1L), | ||
| MENTOR("ROLE_MENTOR", 2L), | ||
| TECHEER("ROLE_TECHEER", 3L), | ||
| COMPANY("ROLE_COMPANY", null), | ||
| BOOTCAMP("ROLE_BOOTCAMP", null); | ||
|
|
||
| private final String roleName; | ||
| private final Long roleId; | ||
|
|
||
| RoleType(String roleName) { | ||
| RoleType(String roleName, Long roleId) { | ||
| this.roleName = roleName; | ||
| this.roleId = roleId; | ||
| } | ||
|
|
||
| public String getRoleName() { | ||
| return roleName; | ||
| } | ||
|
|
||
| /** | ||
| * DB 마이그레이션에서 정의된 roleId를 반환합니다. ADMIN=1, MENTOR=2, TECHEER=3으로 고정되어 있습니다. 다른 RoleType의 경우 | ||
| * null을 반환할 수 있습니다. | ||
| */ | ||
| public Long getRoleId() { | ||
| return roleId; | ||
| } | ||
| } | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.