fix: ticket category check constraint + employee access to projects/dispatches

This commit is contained in:
pray4skylark
2026-06-08 17:13:41 +09:00
parent a9ba081144
commit 7dd8993975
3 changed files with 5 additions and 2 deletions
@@ -48,7 +48,7 @@ public class DispatchHistoryController {
} }
@Operation(summary = "현재 파견 중인 직원 목록", description = "파견중인 직원 목록을 조회합니다") @Operation(summary = "현재 파견 중인 직원 목록", description = "파견중인 직원 목록을 조회합니다")
@PreAuthorize("hasAnyRole('MANAGER', 'ADMIN')") @PreAuthorize("hasAnyRole('EMPLOYEE', 'MANAGER', 'ADMIN')")
@GetMapping("/active") @GetMapping("/active")
public ResponseEntity<ApiResponse<List<DispatchHistory>>> getActiveDispatches() { public ResponseEntity<ApiResponse<List<DispatchHistory>>> getActiveDispatches() {
List<DispatchHistory> list = dispatchHistoryService.getActiveDispatches(); List<DispatchHistory> list = dispatchHistoryService.getActiveDispatches();
@@ -45,7 +45,7 @@ public class ProjectController {
} }
@Operation(summary = "프로젝트 목록 조회", description = "전체 프로젝트 목록을 조회합니다. 상태 필터 옵션 포함") @Operation(summary = "프로젝트 목록 조회", description = "전체 프로젝트 목록을 조회합니다. 상태 필터 옵션 포함")
@PreAuthorize("hasAnyRole('MANAGER', 'ADMIN')") @PreAuthorize("hasAnyRole('EMPLOYEE', 'MANAGER', 'ADMIN')")
@Transactional(readOnly = true) @Transactional(readOnly = true)
@GetMapping @GetMapping
public ResponseEntity<ApiResponse<List<Project>>> findAll( public ResponseEntity<ApiResponse<List<Project>>> findAll(
@@ -0,0 +1,3 @@
ALTER TABLE tb_ticket DROP CONSTRAINT IF EXISTS tb_ticket_category_check;
ALTER TABLE tb_ticket ADD CONSTRAINT tb_ticket_category_check
CHECK (category IN ('BUG', 'FEATURE', 'SUPPORT', 'QA', 'VACATION', 'EXPENSE', 'EQUIPMENT_REQUEST', 'GENERAL'));