Skip to content
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

Add clientId parameter to IAuditLogRepository. #19368

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Task<List<AuditLog>> GetListAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand All @@ -35,6 +36,7 @@ Task<long> GetCountAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public virtual async Task<List<AuditLog>> GetListAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand All @@ -46,6 +47,7 @@ public virtual async Task<List<AuditLog>> GetListAsync(
endTime,
httpMethod,
url,
clientId,
userId,
userName,
applicationName,
Expand All @@ -71,6 +73,7 @@ public virtual async Task<long> GetCountAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand All @@ -87,6 +90,7 @@ public virtual async Task<long> GetCountAsync(
endTime,
httpMethod,
url,
clientId,
userId,
userName,
applicationName,
Expand All @@ -108,6 +112,7 @@ protected virtual async Task<IQueryable<AuditLog>> GetListQueryAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand All @@ -128,6 +133,7 @@ protected virtual async Task<IQueryable<AuditLog>> GetListQueryAsync(
.WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null || auditLog.Exceptions == "")
.WhereIf(!httpMethod.IsNullOrEmpty(), auditLog => auditLog.HttpMethod == httpMethod)
.WhereIf(!url.IsNullOrEmpty(), auditLog => auditLog.Url != null && auditLog.Url.Contains(url))
.WhereIf(!clientId.IsNullOrEmpty(), auditLog => auditLog.ClientId == clientId)
.WhereIf(userId != null, auditLog => auditLog.UserId == userId)
.WhereIf(!userName.IsNullOrEmpty(), auditLog => auditLog.UserName == userName)
.WhereIf(!applicationName.IsNullOrEmpty(), auditLog => auditLog.ApplicationName == applicationName)
Expand Down Expand Up @@ -159,7 +165,7 @@ public override IQueryable<AuditLog> WithDetails()
return GetQueryable().IncludeDetails();
}

public override async Task<IQueryable<AuditLog>> WithDetailsAsync()
public async override Task<IQueryable<AuditLog>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public virtual async Task<List<AuditLog>> GetListAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand All @@ -47,6 +48,7 @@ public virtual async Task<List<AuditLog>> GetListAsync(
endTime,
httpMethod,
url,
clientId,
userId,
userName,
applicationName,
Expand All @@ -72,6 +74,7 @@ public virtual async Task<long> GetCountAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand All @@ -88,6 +91,7 @@ public virtual async Task<long> GetCountAsync(
endTime,
httpMethod,
url,
clientId,
userId,
userName,
applicationName,
Expand All @@ -111,6 +115,7 @@ protected virtual async Task<IQueryable<AuditLog>> GetListQueryAsync(
DateTime? endTime = null,
string httpMethod = null,
string url = null,
string clientId = null,
Guid? userId = null,
string userName = null,
string applicationName = null,
Expand All @@ -130,6 +135,7 @@ protected virtual async Task<IQueryable<AuditLog>> GetListQueryAsync(
.WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null || auditLog.Exceptions == "")
.WhereIf(!httpMethod.IsNullOrEmpty(), auditLog => auditLog.HttpMethod == httpMethod)
.WhereIf(!url.IsNullOrEmpty(), auditLog => auditLog.Url != null && auditLog.Url.Contains(url))
.WhereIf(!clientId.IsNullOrEmpty(), auditLog => auditLog.ClientId == clientId)
.WhereIf(userId != null, auditLog => auditLog.UserId == userId)
.WhereIf(!userName.IsNullOrEmpty(), auditLog => auditLog.UserName == userName)
.WhereIf(!applicationName.IsNullOrEmpty(), auditLog => auditLog.ApplicationName == applicationName)
Expand Down
Loading