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

Method UpdateUserNotificationPreferences

coderd/database/dbauthz/dbauthz.go:7520–7525  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateUserNotificationPreferencesParams)

Source from the content-addressed store, hash-verified

7518}
7519
7520func (q *querier) UpdateUserNotificationPreferences(ctx context.Context, arg database.UpdateUserNotificationPreferencesParams) (int64, error) {
7521 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceNotificationPreference.WithOwner(arg.UserID.String())); err != nil {
7522 return -1, err
7523 }
7524 return q.db.UpdateUserNotificationPreferences(ctx, arg)
7525}
7526
7527func (q *querier) UpdateUserProfile(ctx context.Context, arg database.UpdateUserProfileParams) (database.User, error) {
7528 u, err := q.db.GetUserByID(ctx, arg.ID)

Callers

nothing calls this directly

Calls 4

authorizeContextMethod · 0.95
WithOwnerMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected