Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update template method API#14097

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

Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
27 commits
Select commitHold shift + click to select a range
ec9db0e
Implement notification template update auditing
dannykoppingJul 25, 2024
a7b400b
Add notification preferences migrations
dannykoppingJul 23, 2024
d88ab8b
Add preferences queries
dannykoppingJul 23, 2024
e6e4702
Allow notification templates to be auditable
dannykoppingJul 25, 2024
e9d904d
Add kind to notification_templates and query to retrieve templates by…
dannykoppingJul 26, 2024
b5a5932
Remove redundant suffix on trigger name
dannykoppingJul 29, 2024
eff74a2
Add notification preferences RBAC role
dannykoppingJul 29, 2024
af75c74
UpdateUserNotificationPreferences
dannykoppingJul 29, 2024
65e8546
RBAC for notification templates & preferences
dannykoppingAug 1, 2024
20e55d5
CI
dannykoppingAug 1, 2024
8061685
Self-review, appeasing CI
dannykoppingAug 1, 2024
b9f4ea6
Self-review, appeasing CI
dannykoppingAug 1, 2024
77cfe3e
Merge branch 'main' of https://github.com/coder/coder into dk/notific…
dannykoppingAug 2, 2024
c30f562
CI
dannykoppingAug 2, 2024
95960ca
Fixture, add composite primary key
dannykoppingAug 2, 2024
46a6d51
Merge branch 'dk/notification-prefs/db-audit' of github.com:coder/cod…
dannykoppingAug 2, 2024
76d4ca5
Self-review
dannykoppingAug 2, 2024
4a795e0
fix: typo in notification template (#14108)
mtojekAug 2, 2024
6f4f3e4
chore: skip dogfood workflow for dependabot PRs (#14111)
matifaliAug 2, 2024
f7a102e
Update template method API
dannykoppingJul 25, 2024
1650818
Template method update tests
dannykoppingJul 29, 2024
62e1ad2
make gen
dannykoppingJul 29, 2024
c8ce53a
Using "kind" not "is_system"
dannykoppingJul 29, 2024
72cc4f1
Group routes in AGPL router
dannykoppingJul 29, 2024
a28ee3a
Use PUT since this endpoint is idempotent
dannykoppingJul 29, 2024
3e27046
Only use pg when necessary
dannykoppingAug 1, 2024
7c06846
Fix notification settings test
dannykoppingAug 1, 2024
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
3 changes: 1 addition & 2 deletions.github/workflows/dogfood.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,8 +10,6 @@ on:
- "flake.lock"
- "flake.nix"
pull_request:
branches-ignore:
- "dependabot/**"
paths:
- "dogfood/**"
- ".github/workflows/dogfood.yaml"
Expand All@@ -21,6 +19,7 @@ on:

jobs:
build_image:
if: github.actor != 'dependabot[bot]' # Skip Dependabot PRs
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
88 changes: 86 additions & 2 deletionscoderd/apidoc/docs.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

80 changes: 78 additions & 2 deletionscoderd/apidoc/swagger.json
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

3 changes: 2 additions & 1 deletioncoderd/audit/diff.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,8 @@ type Auditable interface {
database.OAuth2ProviderAppSecret |
database.CustomRole |
database.AuditableOrganizationMember |
database.Organization
database.Organization |
database.NotificationTemplate
}

// Map is a map of changed fields in an audited resource. It maps field names to
Expand Down
9 changes: 9 additions & 0 deletionscoderd/audit/request.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,9 +16,10 @@
"golang.org/x/xerrors"

"cdr.dev/slog"

"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbtime"
"github.com/coder/coder/v2/coderd/httpmw"

Check failure on line 22 in coderd/audit/request.go

View workflow job for this annotation

GitHub Actions/ lint

could not import github.com/coder/coder/v2/coderd/httpmw (-: # github.com/coder/coder/v2/coderd/httpmw
"github.com/coder/coder/v2/coderd/tracing"
)

Expand DownExpand Up@@ -117,6 +118,8 @@
return typed.Username
case database.Organization:
return typed.Name
case database.NotificationTemplate:
return typed.Name
default:
panic(fmt.Sprintf("unknown resource %T for ResourceTarget", tgt))
}
Expand DownExpand Up@@ -163,6 +166,8 @@
return typed.UserID
case database.Organization:
return typed.ID
case database.NotificationTemplate:
return typed.ID
default:
panic(fmt.Sprintf("unknown resource %T for ResourceID", tgt))
}
Expand DownExpand Up@@ -206,6 +211,8 @@
return database.ResourceTypeOrganizationMember
case database.Organization:
return database.ResourceTypeOrganization
case database.NotificationTemplate:
return database.ResourceTypeNotificationTemplate
default:
panic(fmt.Sprintf("unknown resource %T for ResourceType", typed))
}
Expand DownExpand Up@@ -251,6 +258,8 @@
return true
case database.Organization:
return true
case database.NotificationTemplate:
return false
default:
panic(fmt.Sprintf("unknown resource %T for ResourceRequiresOrgID", tgt))
}
Expand Down
8 changes: 7 additions & 1 deletioncoderd/coderd.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1243,9 +1243,15 @@ func New(options *Options) *API {
})
})
r.Route("/notifications", func(r chi.Router) {
r.Use(apiKeyMiddleware)
r.Use(
apiKeyMiddleware,
httpmw.RequireExperiment(api.Experiments, codersdk.ExperimentNotifications),
)
r.Get("/settings", api.notificationsSettings)
r.Put("/settings", api.putNotificationsSettings)
r.Route("/templates", func(r chi.Router) {
r.Get("/system", api.systemNotificationTemplates)
})
})
})

Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp