INFRA-3971 | Harinder | Fine tuning results shown in Review table. If the one of the reviewer didn't take action but if it is already rejected/approved then current reviewer should not see the same in his/her list of pending reviews (#1265)

* INFRA-3971 | Harinder | Integrating JustInTime access in deployment portal frontend

* INFRA-3971 | Harinder | Updating list of reviews and requests to 20

* INFRA-3971 | Harinder | Formatting JitController

* INFRA-3971 | Harinder | Updating display tables for AWS CUSTOM resource

* INFRA-3971 | Harinder | Updating JitReviewDto class

* INFRA-3971 | Harinder | Adding type attribute of String type for JitRequestStatus enum

* INFRA-3971 | Harinder | Addressing reviewdog comments

* INFRA-3971 | Harinder | Setting max limit of grant window to 24 hours through validation

* INFRA-3971 | Harinder | Addressing reviewdog comments

* INFRA-3971 | Harinder | Updating application.properties for JIT tests

* INFRA-3971 | Harinder | Fine tuning results shown in Review table. If the one of the reviewer didn't take action but if it is already rejected/approved then current reviewer should not see the same in his/her list of pending reviews
This commit is contained in:
Harinder Singh
2024-11-22 15:19:24 +00:00
committed by GitHub
parent 9c1511fcd8
commit bc700fc47d
2 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ public class JitReviewDto extends JitRequestDto {
private Long jitApprovalId;
public JitReviewDto(
Long id,
Long approvalId,
Long jitId,
String requestedFor,
String requestedBy,
@@ -38,6 +38,6 @@ public class JitReviewDto extends JitRequestDto {
super(jitId, requestedFor, requestedBy, vertical, team, environment, resourceType,
resourceId, resourceAction, awsResourceType, awsResourceNames, awsPolicy, grantWindow,
epochSecond, justification, status);
this.jitApprovalId = id;
this.jitApprovalId = approvalId;
}
}

View File

@@ -704,7 +704,7 @@ class JitServiceImpl implements JitService {
JitRequestStatus.PENDING.type, LIST_LIMIT).stream()
.map(obj -> {
JitRequest jitRequest = obj.getJitRequest();
JitReviewDto t = new JitReviewDto(obj.getId(), obj.getId(),
JitReviewDto t = new JitReviewDto(obj.getId(), jitRequest.getId(),
jitRequest.getRequestedFor().getEmail(), jitRequest.getRequestedBy().getEmail(),
jitRequest.getVertical(), jitRequest.getTeam().getName(),
jitRequest.getEnvironment(),
@@ -716,7 +716,7 @@ class JitServiceImpl implements JitService {
jitRequest.getGrantAt().atZone(ZoneId.systemDefault()).toEpochSecond(),
jitRequest.getJustification(), jitRequest.getStatus().toString());
return t;
})
}).filter(jitReviewDto -> jitReviewDto.getStatus() == JitRequestStatus.PENDING.type)
.collect(Collectors.toList());
}