diff --git a/src/main/java/com/epam/ta/reportportal/dao/ProjectUserRepository.java b/src/main/java/com/epam/ta/reportportal/dao/ProjectUserRepository.java index fd3453229..e582bdb31 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/ProjectUserRepository.java +++ b/src/main/java/com/epam/ta/reportportal/dao/ProjectUserRepository.java @@ -19,6 +19,7 @@ import com.epam.ta.reportportal.entity.user.ProjectUser; import com.epam.ta.reportportal.entity.user.ProjectUserId; import java.util.List; +import java.util.Optional; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -30,4 +31,6 @@ public interface ProjectUserRepository extends ReportPortalRepository findProjectIdsByUserId(@Param("userId") Long userId); + + Optional findProjectUserByUserIdAndProjectId(Long userId, Long projectId); }