Skip to content

chore: disallow inbox as default method #17093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 25, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add todo comment
  • Loading branch information
DanielleMaywood committed Mar 25, 2025
commit d7f64b72d7d5133585297466935c57592e181ad0
6 changes: 5 additions & 1 deletion coderd/notifications/enqueuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ type StoreEnqueuer struct {
// NewStoreEnqueuer creates an Enqueuer implementation which can persist notification messages in the store.
func NewStoreEnqueuer(cfg codersdk.NotificationsConfig, store Store, helpers template.FuncMap, log slog.Logger, clock quartz.Clock) (*StoreEnqueuer, error) {
var method database.NotificationMethod
// We do not allow setting Coder Inbox as the default method.
// TODO(DanielleMaywood):
// Currently we do not want to allow setting `inbox` as the default notification method.
// As of 2025-03-25, setting this to `inbox` would cause a crash on the deployment
// notification settings page. Until we make a future decision on this we want to disallow
// setting it.
if err := method.Scan(cfg.Method.String()); err != nil || method == database.NotificationMethodInbox {
return nil, InvalidDefaultNotificationMethodError{Method: cfg.Method.String()}
}
Expand Down