AuthorizationAspectTest
Tests
| Test |
Method name |
Duration |
Result |
| @PreAuthorize value가 빈 문자열이면 검사하지 않고 통과 |
blankValue_pass() |
0.051s |
passed |
| 필요 권한이 있고, 사용자에게 권한이 있으면 통과 |
hasAuthority_pass() |
0.001s |
passed |
| 필요 권한이 있는데 사용자에게 없으면 AccessDeniedException |
missingAuthority_denied() |
0.002s |
passed |
| @PreAuthorize 가 없으면 아무 것도 안 함 |
noAnnotation_doNothing() |
0.001s |
passed |
| Authentication 자체가 없으면 권한 없음으로 간주 → AccessDeniedException |
noAuthentication_denied() |
0.001s |
passed |
Standard error
[WARN] @PreAuthorize annotation on method blankValue has no value defined. Access will be granted by default.