-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vs internal issue #5807 #21989
Vs internal issue #5807 #21989
Conversation
@@ -482,6 +487,7 @@ protected virtual async Task<IQueryable<IdentityUser>> GetFilteredQueryableAsync | |||
.WhereIf(maxCreationTime != null, p => p.CreationTime <= maxCreationTime) | |||
.WhereIf(minCreationTime != null, p => p.CreationTime >= minCreationTime) | |||
.WhereIf(maxModifitionTime != null, p => p.LastModificationTime <= maxModifitionTime) | |||
.WhereIf(minModifitionTime != null, p => p.LastModificationTime >= minModifitionTime); | |||
.WhereIf(minModifitionTime != null, p => p.LastModificationTime >= minModifitionTime) | |||
.WhereIf(id.HasValue, x => x.Id == id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If id.HasValue
, we can ignore other filters. also same for MongoIdentityUserRepository
if(id.HasValue)
{
return query.Where(x => x.Id == id);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the enhancment you mentioned.
if (id.HasValue) | ||
{ | ||
return query.Where(x => x.Id == id); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move to after var query = await GetQueryableAsync();
It has priority over roleId.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #21989 +/- ##
==========================================
+ Coverage 51.97% 52.00% +0.03%
==========================================
Files 3181 3183 +2
Lines 102210 102334 +124
Branches 7741 7772 +31
==========================================
+ Hits 53121 53219 +98
- Misses 47450 47466 +16
- Partials 1639 1649 +10 ☔ View full report in Codecov by Sentry. |
Added Id field to be able to filter users by there Id's too.
Resolves vs-internal issue #5807
Checklist
How to test it?
You can test it at ABP Admin -> Identity Management-> Users pages filter section.