|
|
|
@ -5,12 +5,14 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|
|
|
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
|
|
|
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
import kr.re.etri.autoflow.entity.ProjectPermission;
|
|
|
|
import kr.re.etri.autoflow.entity.ProjectPermission;
|
|
|
|
|
|
|
|
import kr.re.etri.autoflow.entity.UserProjectMapEntity;
|
|
|
|
import kr.re.etri.autoflow.payload.request.UserPermissionRequest;
|
|
|
|
import kr.re.etri.autoflow.payload.request.UserPermissionRequest;
|
|
|
|
import kr.re.etri.autoflow.service.ProjectPermissionService;
|
|
|
|
import kr.re.etri.autoflow.service.ProjectPermissionService;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Set;
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@ -33,6 +35,15 @@ public class ProjectPermissionController {
|
|
|
|
return ResponseEntity.ok().build();
|
|
|
|
return ResponseEntity.ok().build();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "사용자 프로젝트 조회", description = "특정 사용자가 속한 모든 프로젝트와 권한을 조회합니다.")
|
|
|
|
|
|
|
|
@GetMapping("/user/{userId}/projects")
|
|
|
|
|
|
|
|
public ResponseEntity<List<UserProjectMapEntity>> getUserProjects(
|
|
|
|
|
|
|
|
@Parameter(description = "유저 ID") @PathVariable Long userId
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
List<UserProjectMapEntity> projects = projectPermissionService.getUserProjects(userId);
|
|
|
|
|
|
|
|
return ResponseEntity.ok(projects);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "사용자 권한 조회")
|
|
|
|
@Operation(summary = "사용자 권한 조회")
|
|
|
|
@GetMapping("/{projectId}/users/{userId}/permissions")
|
|
|
|
@GetMapping("/{projectId}/users/{userId}/permissions")
|
|
|
|
public ResponseEntity<Set<ProjectPermission>> getUserPermissions(
|
|
|
|
public ResponseEntity<Set<ProjectPermission>> getUserPermissions(
|
|
|
|
|