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

Method GetWebpushSubscriptionsByUserID

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

Source from the content-addressed store, hash-verified

4851}
4852
4853func (q *querier) GetWebpushSubscriptionsByUserID(ctx context.Context, userID uuid.UUID) ([]database.WebpushSubscription, error) {
4854 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceWebpushSubscription.WithOwner(userID.String())); err != nil {
4855 return nil, err
4856 }
4857 return q.db.GetWebpushSubscriptionsByUserID(ctx, userID)
4858}
4859
4860func (q *querier) GetWebpushVAPIDKeys(ctx context.Context) (database.GetWebpushVAPIDKeysRow, error) {
4861 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceDeploymentConfig); err != nil {

Callers

nothing calls this directly

Calls 4

authorizeContextMethod · 0.95
WithOwnerMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected