Skip to content

Commit d784919

Browse files
TD-4884 Prevent supervisors from viewing/reviewing self assessments in a category that doesn't match their own
1 parent d747f85 commit d784919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DigitalLearningSolutions.Data/DataServices/SupervisorDataService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ FROM CandidateAssessmentSupervisors AS cas INNER JOIN
590590
NRPSubGroups AS sg ON sa.NRPSubGroupID = sg.ID LEFT OUTER JOIN
591591
NRPRoles AS r ON sa.NRPRoleID = r.ID
592592
LEFT OUTER JOIN SelfAssessmentSupervisorRoles AS sasr ON cas.SelfAssessmentSupervisorRoleID = sasr.ID
593-
WHERE (ca.ID = @candidateAssessmentId) AND (cas.Removed IS NULL) AND (sd.SupervisorAdminID = @adminId) AND (sa.CategoryID = @adminIdCategoryId)",
593+
WHERE (ca.ID = @candidateAssessmentId) AND (cas.Removed IS NULL) AND (sd.SupervisorAdminID = @adminId) AND (ISNULL(@adminIdCategoryID, 0) = 0 OR sa.CategoryID = @adminIdCategoryId)",
594594
new { candidateAssessmentId, adminId, adminIdCategoryId }
595595
).FirstOrDefault();
596596
}

0 commit comments

Comments
 (0)