Skip to content

Commit ab2a18a

Browse files
authored
Merge pull request #2942 from TechnologyEnhancedLearning/Develop/Features/TD-4884-Preventsupervisorsfromviewing/reviewingselfassessmentsinacategorythatdoesn'tmatchtheirownallowall
TD-4884 Prevent supervisors from viewing/reviewing self assessments in a category that doesn't match their own
2 parents 43c8c53 + d524ddc commit ab2a18a

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
@@ -690,7 +690,7 @@ FROM CandidateAssessmentSupervisors AS cas INNER JOIN
690690
NRPSubGroups AS sg ON sa.NRPSubGroupID = sg.ID LEFT OUTER JOIN
691691
NRPRoles AS r ON sa.NRPRoleID = r.ID
692692
LEFT OUTER JOIN SelfAssessmentSupervisorRoles AS sasr ON cas.SelfAssessmentSupervisorRoleID = sasr.ID
693-
WHERE (ca.ID = @candidateAssessmentId) AND (cas.Removed IS NULL) AND (sd.SupervisorAdminID = @adminId) AND (sa.CategoryID = @adminIdCategoryId)",
693+
WHERE (ca.ID = @candidateAssessmentId) AND (cas.Removed IS NULL) AND (sd.SupervisorAdminID = @adminId) AND (ISNULL(@adminIdCategoryID, 0) = 0 OR sa.CategoryID = @adminIdCategoryId)",
694694
new { candidateAssessmentId, adminId, adminIdCategoryId }
695695
).FirstOrDefault();
696696
}

0 commit comments

Comments
 (0)