Skip to content

Commit 1eaba70

Browse files
CLAP-214 카테고리 조회 Secured 설정 (#337)
CLAP-214 Hotifx : 카테고리 조회 Secured 설정 <footer> - 관련: #216
1 parent 8dcc77f commit 1eaba70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/clap/server/adapter/inbound/web/admin/FindCategoryController.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import io.swagger.v3.oas.annotations.tags.Tag;
1212
import lombok.RequiredArgsConstructor;
1313
import org.springframework.http.ResponseEntity;
14+
import org.springframework.security.access.annotation.Secured;
1415
import org.springframework.web.bind.annotation.GetMapping;
1516
import org.springframework.web.bind.annotation.RequestMapping;
1617

@@ -27,18 +28,21 @@ public class FindCategoryController {
2728

2829
@Operation(summary = "모든 카테고리 조회")
2930
@GetMapping("/category")
31+
@Secured({"ROLE_USER", "ROLE_MANAGER", "ROLE_ADMIN"})
3032
public ResponseEntity<List<FindAllCategoryResponse>> findAllCategory() {
3133
return ResponseEntity.ok(findAllCategoryUsecase.findAllCategory());
3234
}
3335

3436
@Operation(summary = "1차 카테고리 조회")
3537
@GetMapping("/main-category")
38+
@Secured({"ROLE_USER", "ROLE_MANAGER", "ROLE_ADMIN"})
3639
public ResponseEntity<List<FindMainCategoryResponse>> findMainCategory() {
3740
return ResponseEntity.ok(findmainCategoryUsecase.findMainCategory());
3841
}
3942

4043
@Operation(summary = "2차 카테고리 조회")
4144
@GetMapping("/sub-category")
45+
@Secured({"ROLE_USER", "ROLE_MANAGER", "ROLE_ADMIN"})
4246
public ResponseEntity<List<FindSubCategoryResponse>> findSubCategory() {
4347
return ResponseEntity.ok(findsubCategoryUsecase.findSubCategory());
4448
}

0 commit comments

Comments
 (0)