Skip to content

Commit

Permalink
Fix order of user filters so onlyUsersICreated wins vs guest
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Nov 8, 2024
1 parent daf9921 commit 379ddef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/routes/(authenticated)/admin/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ function buildUserSearchFilter(searchParams: URLSearchParams, user: LexAuthUser)
];
}

if (onlyUsersICreated) {
userFilter.createdById = { eq: user.id as UUID };
}

switch (userType) {
case 'admin':
userFilter.isAdmin = { eq: true };
Expand All @@ -169,6 +165,10 @@ function buildUserSearchFilter(searchParams: URLSearchParams, user: LexAuthUser)
break;
}

if (onlyUsersICreated) {
userFilter.createdById = { eq: user.id as UUID };
}

return userFilter;
}

Expand Down

0 comments on commit 379ddef

Please sign in to comment.