Skip to content

Commit ca5bc15

Browse files
committed
Check for a null member id when checking pulse permissions.
1 parent 1ddde8d commit ca5bc15

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/main/java/com/objectcomputing/checkins/services/pulseresponse/PulseResponseServicesImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ public Set<PulseResponse> findByFields(UUID teamMemberId, LocalDate dateFrom, Lo
133133
// The current user can view the pulse response if they are the team member who submitted the pulse response
134134
// or if they are the supervisor of the team member who submitted the pulse response
135135
private boolean canViewDueToReportingHierarchy(PulseResponse pulse, UUID currentUserId) {
136-
return pulse.getTeamMemberId().equals(currentUserId) ||
137-
isSubordinateTo(pulse.getTeamMemberId(), currentUserId);
136+
UUID id = pulse.getTeamMemberId();
137+
return id != null &&
138+
(id.equals(currentUserId) || isSubordinateTo(id, currentUserId));
138139
}
139140

140141
private boolean isSubordinateTo(UUID reportMember, UUID currentUserId) {

0 commit comments

Comments
 (0)