fix: ticket category check constraint + employee access to projects/dispatches
This commit is contained in:
@@ -48,7 +48,7 @@ public class DispatchHistoryController {
|
||||
}
|
||||
|
||||
@Operation(summary = "현재 파견 중인 직원 목록", description = "파견중인 직원 목록을 조회합니다")
|
||||
@PreAuthorize("hasAnyRole('MANAGER', 'ADMIN')")
|
||||
@PreAuthorize("hasAnyRole('EMPLOYEE', 'MANAGER', 'ADMIN')")
|
||||
@GetMapping("/active")
|
||||
public ResponseEntity<ApiResponse<List<DispatchHistory>>> getActiveDispatches() {
|
||||
List<DispatchHistory> list = dispatchHistoryService.getActiveDispatches();
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ProjectController {
|
||||
}
|
||||
|
||||
@Operation(summary = "프로젝트 목록 조회", description = "전체 프로젝트 목록을 조회합니다. 상태 필터 옵션 포함")
|
||||
@PreAuthorize("hasAnyRole('MANAGER', 'ADMIN')")
|
||||
@PreAuthorize("hasAnyRole('EMPLOYEE', 'MANAGER', 'ADMIN')")
|
||||
@Transactional(readOnly = true)
|
||||
@GetMapping
|
||||
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'));
|
||||
Reference in New Issue
Block a user