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

Method GetUserCodeDiffDisplayMode

coderd/database/dbauthz/dbauthz.go:4670–4679  ·  view source on GitHub ↗
(ctx context.Context, userID uuid.UUID)

Source from the content-addressed store, hash-verified

4668}
4669
4670func (q *querier) GetUserCodeDiffDisplayMode(ctx context.Context, userID uuid.UUID) (string, error) {
4671 user, err := q.db.GetUserByID(ctx, userID)
4672 if err != nil {
4673 return "", err
4674 }
4675 if err := q.authorizeContext(ctx, policy.ActionReadPersonal, user); err != nil {
4676 return "", err
4677 }
4678 return q.db.GetUserCodeDiffDisplayMode(ctx, userID)
4679}
4680
4681func (q *querier) GetUserCount(ctx context.Context, includeSystem bool) (int64, error) {
4682 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceSystem); err != nil {

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetUserByIDMethod · 0.65

Tested by

no test coverage detected