mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add filtering by service account (#23468)
You can now filter by/out service accounts using `service_account:true/false` or using the filter dropdown.
This commit is contained in:
+12
-11
@@ -353,17 +353,18 @@ func (api *API) GetUsers(rw http.ResponseWriter, r *http.Request) ([]database.Us
|
||||
}
|
||||
|
||||
userRows, err := api.Database.GetUsers(ctx, database.GetUsersParams{
|
||||
AfterID: paginationParams.AfterID,
|
||||
Search: params.Search,
|
||||
Name: params.Name,
|
||||
Status: params.Status,
|
||||
RbacRole: params.RbacRole,
|
||||
LastSeenBefore: params.LastSeenBefore,
|
||||
LastSeenAfter: params.LastSeenAfter,
|
||||
CreatedAfter: params.CreatedAfter,
|
||||
CreatedBefore: params.CreatedBefore,
|
||||
GithubComUserID: params.GithubComUserID,
|
||||
LoginType: params.LoginType,
|
||||
AfterID: paginationParams.AfterID,
|
||||
Search: params.Search,
|
||||
Name: params.Name,
|
||||
Status: params.Status,
|
||||
IsServiceAccount: params.IsServiceAccount,
|
||||
RbacRole: params.RbacRole,
|
||||
LastSeenBefore: params.LastSeenBefore,
|
||||
LastSeenAfter: params.LastSeenAfter,
|
||||
CreatedAfter: params.CreatedAfter,
|
||||
CreatedBefore: params.CreatedBefore,
|
||||
GithubComUserID: params.GithubComUserID,
|
||||
LoginType: params.LoginType,
|
||||
// #nosec G115 - Pagination offsets are small and fit in int32
|
||||
OffsetOpt: int32(paginationParams.Offset),
|
||||
// #nosec G115 - Pagination limits are small and fit in int32
|
||||
|
||||
Reference in New Issue
Block a user