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

Method GetGroups

coderd/database/dbauthz/dbauthz.go:3543–3553  ·  view source on GitHub ↗
(ctx context.Context, arg database.GetGroupsParams)

Source from the content-addressed store, hash-verified

3541}
3542
3543func (q *querier) GetGroups(ctx context.Context, arg database.GetGroupsParams) ([]database.GetGroupsRow, error) {
3544 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err == nil {
3545 // Optimize this query for system users as it is used in telemetry.
3546 // Calling authz on all groups in a deployment for telemetry jobs is
3547 // excessive. Most user calls should have some filtering applied to reduce
3548 // the size of the set.
3549 return q.db.GetGroups(ctx, arg)
3550 }
3551
3552 return fetchWithPostFilter(q.auth, policy.ActionRead, q.db.GetGroups)(ctx, arg)
3553}
3554
3555func (q *querier) GetHealthSettings(ctx context.Context) (string, error) {
3556 // No authz checks

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
fetchWithPostFilterFunction · 0.85
GetGroupsMethod · 0.65

Tested by

no test coverage detected