Fixed the filtering behavior by InstitutionId when the user has the regionadmin or ministryadmin role.
Now, if the InstitutionId in the filter differs from the InstitutionId associated with the user's role, an empty list is returned instead of the full list of workshops belonging to the role.
Fixed the totalAmount value, which now correctly reflects the total number of workshops found by the filter.
Testing:
Added tests to verify that an empty list is returned when the InstitutionId in the filter does not match the user's role.
Summary of Changes:
InstitutionId
when the user has theregionadmin
orministryadmin
role.InstitutionId
in the filter differs from theInstitutionId
associated with the user's role, an empty list is returned instead of the full list of workshops belonging to the role.totalAmount
value, which now correctly reflects the total number of workshops found by the filter.Testing:
InstitutionId
in the filter does not match the user's role.