Skip to content

Commit a566495

Browse files
FrostyApeOneFrostyApeOne
authored andcommitted
Fixed a bug where a contributor still had access to an application even after removing it
1 parent 98c9d1c commit a566495

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DfE.ExternalApplications.Application/Applications/Queries/GetApplicationsForUserQueryHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task<Result<IReadOnlyCollection<ApplicationDto>>> Handle(
4848
return Result<IReadOnlyCollection<ApplicationDto>>.Success(Array.Empty<ApplicationDto>());
4949

5050
var ids = userWithPerms.Permissions
51-
.Where(p => p.ApplicationId != null)
51+
.Where(p => p is { ApplicationId: not null, ResourceType: ResourceType.Application })
5252
.Select(p => p.ApplicationId!)
5353
.Distinct()
5454
.ToList();

0 commit comments

Comments
 (0)