- Notifications
You must be signed in to change notification settings - Fork927
feat: add killswitch for notifications#13794
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
735d0ef
b6338e5
16c8950
edfff5e
89e1396
ab8a6c7
2522366
7dfbd29
d7f470d
6abf39f
341485f
c90ff21
da6775f
9d430bb
a55fc8a
af36afb
7e8ad09
ce1a9e9
dbf6a40
c2e181c
fa0f381
83978e7
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1479,6 +1479,11 @@ func (q *querier) GetNotificationMessagesByStatus(ctx context.Context, arg datab | ||
return q.db.GetNotificationMessagesByStatus(ctx, arg) | ||
} | ||
func (q *querier) GetNotificationsSettings(ctx context.Context) (string, error) { | ||
// No authz checks | ||
dannykopping marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
return q.db.GetNotificationsSettings(ctx) | ||
} | ||
func (q *querier) GetOAuth2ProviderAppByID(ctx context.Context, id uuid.UUID) (database.OAuth2ProviderApp, error) { | ||
if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceOauth2App); err != nil { | ||
return database.OAuth2ProviderApp{}, err | ||
@@ -3687,6 +3692,13 @@ func (q *querier) UpsertLogoURL(ctx context.Context, value string) error { | ||
return q.db.UpsertLogoURL(ctx, value) | ||
} | ||
func (q *querier) UpsertNotificationsSettings(ctx context.Context, value string) error { | ||
if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceDeploymentConfig); err != nil { | ||
return err | ||
} | ||
return q.db.UpsertNotificationsSettings(ctx, value) | ||
} | ||
func (q *querier) UpsertOAuthSigningKey(ctx context.Context, value string) error { | ||
if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceSystem); err != nil { | ||
return err | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2350,6 +2350,12 @@ func (s *MethodTestSuite) TestSystemFunctions() { | ||
s.Run("UpsertHealthSettings", s.Subtest(func(db database.Store, check *expects) { | ||
check.Args("foo").Asserts(rbac.ResourceDeploymentConfig, policy.ActionUpdate) | ||
})) | ||
s.Run("GetNotificationsSettings", s.Subtest(func(db database.Store, check *expects) { | ||
check.Args().Asserts() | ||
dannykopping marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
})) | ||
s.Run("UpsertNotificationsSettings", s.Subtest(func(db database.Store, check *expects) { | ||
check.Args("foo").Asserts(rbac.ResourceDeploymentConfig, policy.ActionUpdate) | ||
})) | ||
s.Run("GetDeploymentWorkspaceAgentStats", s.Subtest(func(db database.Store, check *expects) { | ||
check.Args(time.Time{}).Asserts() | ||
})) | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.