Skip to content

Commit 13ebb47

Browse files
authored
Merge pull request #784 from bcgov/yj
fix: LG to be able to see listing upload history
2 parents 373e8d9 + 4214b51 commit 13ebb47

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server/StrDss.Data/Repositories/UploadDeliveryRepository.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,14 @@ public async Task<PagedDto<UploadHistoryViewDto>> GetUploadHistory(long? orgId,
151151
{
152152
var query = _dbContext.DssRentalUploadHistoryViews.AsNoTracking();
153153

154-
if (_currentUser.OrganizationType != OrganizationTypes.BCGov)
154+
if (reportTypes.Contains(UploadDeliveryTypes.LicenceData) && _currentUser.OrganizationType != OrganizationTypes.BCGov)
155+
{
156+
query = query.Where(x => x.ProvidingOrganizationId == _currentUser.OrganizationId);
157+
}
158+
else if (_currentUser.OrganizationType != OrganizationTypes.BCGov && _currentUser.OrganizationType != OrganizationTypes.LG)
159+
{
155160
query = query.Where(x => x.ProvidingOrganizationId == _currentUser.OrganizationId);
161+
}
156162

157163
if (orgId != null)
158164
{

0 commit comments

Comments
 (0)