Skip to content

feat: add database support for dismissed healthchecks #10845

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 9 commits into from
Nov 23, 2023
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
Upsert and Get
  • Loading branch information
mtojek committed Nov 23, 2023
commit 7c024f64cfc6e454659dbcbc6bdd11978728891d
8 changes: 6 additions & 2 deletions coderd/database/dbauthz/dbauthz.go
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,8 @@ func (q *querier) GetDeploymentWorkspaceStats(ctx context.Context) (database.Get
}

func (q *querier) GetDismissedHealthchecks(ctx context.Context) (string, error) {
panic("not implemented")
// No authz checks
return q.db.GetDismissedHealthchecks(ctx)
}

func (q *querier) GetExternalAuthLink(ctx context.Context, arg database.GetExternalAuthLinkParams) (database.ExternalAuthLink, error) {
Expand Down Expand Up @@ -2963,7 +2964,10 @@ func (q *querier) UpsertDefaultProxy(ctx context.Context, arg database.UpsertDef
}

func (q *querier) UpsertDismissedHealthchecks(ctx context.Context, value string) error {
panic("not implemented")
if err := q.authorizeContext(ctx, rbac.ActionCreate, rbac.ResourceDeploymentValues); err != nil {
return err
}
return q.db.UpsertDismissedHealthchecks(ctx, value)
}

func (q *querier) UpsertLastUpdateCheck(ctx context.Context, value string) error {
Expand Down