Skip to content

feat: support filtering users table by login type #17238

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

Merged
merged 15 commits into from
Apr 9, 2025
Prev Previous commit
Next Next commit
remove redundant len check
  • Loading branch information
utsavll0 committed Apr 8, 2025
commit 38825d8fc2987bcff714c1b5922a41585a75faba
6 changes: 2 additions & 4 deletions codersdk/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,8 @@ func (c *Client) Users(ctx context.Context, req UsersRequest) (GetUsersResponse,
if req.SearchQuery != "" {
params = append(params, req.SearchQuery)
}
if len(req.LoginType) > 0 {
for _, lt := range req.LoginType {
params = append(params, "login_type:"+string(lt))
}
for _, lt := range req.LoginType {
params = append(params, "login_type:"+string(lt))
}
q.Set("q", strings.Join(params, " "))
r.URL.RawQuery = q.Encode()
Expand Down