Skip to content

Commit

Permalink
Fix failing test where user couldn't see himself
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Nov 19, 2024
1 parent 3ac2011 commit 8930e88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/LexBoxApi/Services/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public IQueryable<User> UserQueryForTypeahead(LexAuthUser user)
var myProjectIds = user.Projects.Select(p => p.ProjectId).ToList();
var myManagedProjectIds = user.Projects.Where(p => p.Role == ProjectRole.Manager).Select(p => p.ProjectId).ToList();
return dbContext.Users.Where(u =>
u.Id == user.Id ||
u.Organizations.Any(orgMember => myOrgIds.Contains(orgMember.OrgId)) ||
u.Projects.Any(projMember =>
myManagedProjectIds.Contains(projMember.ProjectId) ||
Expand Down

0 comments on commit 8930e88

Please sign in to comment.