MCPcopy Index your code
hub / github.com/coder/coder / GetUsers

Method GetUsers

coderd/database/dbauthz/dbauthz.go:4832–4839  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetUsersParams)

Source from the content-addressed store, hash-verified

4830}
4831
4832func (q *querier) GetUsers(ctx context.Context, arg database.GetUsersParams) ([]database.GetUsersRow, error) {
4833 // This does the filtering in SQL.
4834 prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceUser.Type)
4835 if err != nil {
4836 return nil, xerrors.Errorf("(dev error) prepare sql filter: %w", err)
4837 }
4838 return q.db.GetAuthorizedUsers(ctx, arg, prep)
4839}
4840
4841// GetUsersByIDs is only used for usernames on workspace return data.
4842// This function should be replaced by joining this data to the workspace query

Callers 1

GetAuthorizedUsersMethod · 0.95

Calls 3

prepareSQLFilterFunction · 0.85
GetAuthorizedUsersMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected