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

Method GetUserNotificationPreferences

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

Source from the content-addressed store, hash-verified

4736}
4737
4738func (q *querier) GetUserNotificationPreferences(ctx context.Context, userID uuid.UUID) ([]database.NotificationPreference, error) {
4739 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceNotificationPreference.WithOwner(userID.String())); err != nil {
4740 return nil, err
4741 }
4742 return q.db.GetUserNotificationPreferences(ctx, userID)
4743}
4744
4745func (q *querier) GetUserSecretByID(ctx context.Context, id uuid.UUID) (database.UserSecret, error) {
4746 return fetch(q.log, q.auth, q.db.GetUserSecretByID)(ctx, id)

Callers

nothing calls this directly

Calls 4

authorizeContextMethod · 0.95
WithOwnerMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected